blob: f6de6cbe34be722fe00b1bf660a92d1a52e35e90 [file] [log] [blame]
DRC211d1e72013-01-13 11:25:20 +00001lib_LTLIBRARIES = libjpeg.la
DRC6da61db2013-01-19 01:06:46 +00002libjpeg_la_LDFLAGS = -version-info ${LIBTOOL_CURRENT}:${SO_MINOR_VERSION}:${SO_AGE} -no-undefined
DRC211d1e72013-01-13 11:25:20 +00003include_HEADERS = jerror.h jmorecfg.h jpeglib.h
4
5if WITH_TURBOJPEG
6lib_LTLIBRARIES += libturbojpeg.la
DRCfd407772012-03-23 03:24:39 +00007libturbojpeg_la_LDFLAGS = -version-info 0:0 -no-undefined
DRC211d1e72013-01-13 11:25:20 +00008include_HEADERS += turbojpeg.h
9endif
10
DRC0a945a12010-02-15 11:04:51 +000011nodist_include_HEADERS = jconfig.h
DRC0c0f3042010-01-28 05:34:53 +000012
DRC211d1e72013-01-13 11:25:20 +000013
Adam Tkacda5a1fe2008-10-22 11:19:25 +000014HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
DRC1f80a102010-10-18 00:15:31 +000015 jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h
Constantin Kaplinsky0ca44252008-09-28 05:08:48 +000016
DRCe3720042010-11-23 06:50:14 +000017libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
18 jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
19 jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
20 jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
21 jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
22 jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
23 jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
24 jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
25
26if WITH_ARITH
DRCe3720042010-11-23 06:50:14 +000027libjpeg_la_SOURCES += jaricom.c
DRCe3720042010-11-23 06:50:14 +000028endif
29
30if WITH_ARITH_ENC
DRCe3720042010-11-23 06:50:14 +000031libjpeg_la_SOURCES += jcarith.c
DRCe3720042010-11-23 06:50:14 +000032endif
33
34if WITH_ARITH_DEC
DRCe3720042010-11-23 06:50:14 +000035libjpeg_la_SOURCES += jdarith.c
DRCe3720042010-11-23 06:50:14 +000036endif
Constantin Kaplinsky0ca44252008-09-28 05:08:48 +000037
DRC211d1e72013-01-13 11:25:20 +000038
39SUBDIRS = java
40
41
42if WITH_TURBOJPEG
43
DRC418dbdf2011-05-26 10:45:06 +000044libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \
DRC9b28def2011-05-21 14:37:15 +000045 transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c
DRCf8e00552011-02-04 11:06:36 +000046
DRCf2602ce2011-04-01 00:20:33 +000047if WITH_JAVA
DRCf8e00552011-02-04 11:06:36 +000048
49libturbojpeg_la_SOURCES += turbojpeg-jni.c
DRCe08c05f2011-03-31 08:03:26 +000050libturbojpeg_la_CFLAGS = ${JNI_CFLAGS}
DRCf8e00552011-02-04 11:06:36 +000051TJMAPFILE = turbojpeg-mapfile.jni
52
53else
54
55TJMAPFILE = turbojpeg-mapfile
56
57endif
58
59libturbojpeg_la_SOURCES += $(TJMAPFILE)
DRC6f8c6682010-02-16 05:03:51 +000060
61if VERSION_SCRIPT
DRC9fa95592011-02-25 00:23:44 +000062libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/$(TJMAPFILE)
DRC211d1e72013-01-13 11:25:20 +000063endif
DRC6f8c6682010-02-16 05:03:51 +000064
65endif
DRC1bf1a142010-02-11 06:39:32 +000066
DRC211d1e72013-01-13 11:25:20 +000067
68if VERSION_SCRIPT
69libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map
70endif
71
72
DRC60cddeb2010-02-12 05:37:07 +000073if WITH_SIMD
74
DRCf2602ce2011-04-01 00:20:33 +000075SUBDIRS += simd
Pierre Ossman3a65ef42009-03-16 13:34:18 +000076libjpeg_la_LIBADD = simd/libsimd.la
DRC1bf1a142010-02-11 06:39:32 +000077libturbojpeg_la_LIBADD = simd/libsimd.la
Pierre Ossman2ae181c2009-03-09 13:21:27 +000078
DRC60cddeb2010-02-12 05:37:07 +000079else
80
81libjpeg_la_SOURCES += jsimd_none.c
82
83endif
84
DRC211d1e72013-01-13 11:25:20 +000085
86bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom
87noinst_PROGRAMS = jcstest
88
89
90if WITH_TURBOJPEG
91
92bin_PROGRAMS += tjbench
93
94noinst_PROGRAMS += tjunittest
DRC2e7b76b2009-04-03 12:04:24 +000095
DRC3185cb92011-05-25 03:52:22 +000096tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \
DRC18821f82011-05-24 17:07:51 +000097 wrbmp.c wrppm.c
DRC2e7b76b2009-04-03 12:04:24 +000098
DRC3185cb92011-05-25 03:52:22 +000099tjbench_LDADD = libturbojpeg.la libjpeg.la -lm
DRC2e7b76b2009-04-03 12:04:24 +0000100
DRC3185cb92011-05-25 03:52:22 +0000101tjbench_CFLAGS = -DBMP_SUPPORTED -DPPM_SUPPORTED
DRCbe49b8c2011-05-24 13:41:27 +0000102
DRC3185cb92011-05-25 03:52:22 +0000103tjunittest_SOURCES = tjunittest.c tjutil.h tjutil.c
DRC2e7b76b2009-04-03 12:04:24 +0000104
DRC3185cb92011-05-25 03:52:22 +0000105tjunittest_LDADD = libturbojpeg.la
DRC73de9822009-06-25 20:41:17 +0000106
DRC211d1e72013-01-13 11:25:20 +0000107endif
108
109
DRC73de9822009-06-25 20:41:17 +0000110cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
DRC9a341f82014-04-15 03:43:44 +0000111 rdppm.c rdswitch.c rdtarga.c
DRC73de9822009-06-25 20:41:17 +0000112
DRC971d8512010-02-13 22:55:05 +0000113cjpeg_LDADD = libjpeg.la
DRC73de9822009-06-25 20:41:17 +0000114
115cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
116 -DTARGA_SUPPORTED
117
118djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
119 wrbmp.c wrgif.c wrppm.c wrtarga.c
120
DRC971d8512010-02-13 22:55:05 +0000121djpeg_LDADD = libjpeg.la
DRC73de9822009-06-25 20:41:17 +0000122
123djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
124 -DTARGA_SUPPORTED
DRC60fa0602010-02-12 06:01:49 +0000125
DRC0a945a12010-02-15 11:04:51 +0000126jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
DRC60fa0602010-02-12 06:01:49 +0000127
DRC971d8512010-02-13 22:55:05 +0000128jpegtran_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +0000129
DRC0a945a12010-02-15 11:04:51 +0000130rdjpgcom_SOURCES = rdjpgcom.c
DRC60fa0602010-02-12 06:01:49 +0000131
DRC971d8512010-02-13 22:55:05 +0000132rdjpgcom_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +0000133
134wrjpgcom_SOURCES = wrjpgcom.c
135
DRC971d8512010-02-13 22:55:05 +0000136wrjpgcom_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +0000137
DRCb76c8402011-12-19 15:01:55 +0000138jcstest_SOURCES = jcstest.c
139
140jcstest_LDADD = libjpeg.la
DRC0a945a12010-02-15 11:04:51 +0000141
DRCcbda81a2010-06-05 01:12:35 +0000142dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
DRC0a945a12010-02-15 11:04:51 +0000143
DRC2f12d7a2013-01-13 01:19:09 +0000144DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.txt \
145 ChangeLog.txt
DRCa1647c82012-02-10 00:39:05 +0000146
147docdir = $(datadir)/doc
DRC01bf9d92012-02-10 01:52:31 +0000148dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \
DRC9a341f82014-04-15 03:43:44 +0000149 wizard.txt
DRCa1647c82012-02-10 00:39:05 +0000150
151exampledir = $(datadir)/doc
DRC01bf9d92012-02-10 01:52:31 +0000152dist_example_DATA = example.c
DRC0a945a12010-02-15 11:04:51 +0000153
DRC750e0782011-05-10 21:05:49 +0000154
DRC0bf58f22013-02-06 23:51:08 +0000155EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
DRCa006fba2011-10-27 23:25:28 +0000156 sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
157 jccolext.c jdcolext.c jdmrgext.c
DRC0a945a12010-02-15 11:04:51 +0000158
159dist-hook:
160 rm -rf `find $(distdir) -name .svn`
161
162
DRC0bf58f22013-02-06 23:51:08 +0000163SUBDIRS += md5
164
DRC211d1e72013-01-13 11:25:20 +0000165MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f
166MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f
167MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c
168MD5_JPEG_FLOAT = d1623885ffafcd40c684af09e3d65cd5
169MD5_JPEG_FLOAT_NOSIMD = fb4884c35f8273f498cb32879de5c455
170MD5_JPEG_INT_GRAY = 72b51f894b8f4a10b3ee3066770aa38d
171MD5_PPM_INT = d1ed0d11f076b842525271647716aeb8
172MD5_PPM_FAST = 048298a2d2410261c0533cb97bcfef23
173MD5_PPM_FLOAT = 7f5b446ee36b2630e06785b8d42af15f
174MD5_PPM_FLOAT_NOSIMD = 64072f1dbdc5b3a187777788604971a5
175MD5_PPM_INT_2_1 = 9f9de8c0612f8d06869b960b05abf9c9
176MD5_PPM_INT_15_8 = b6875bc070720b899566cc06459b63b7
177MD5_PPM_INT_7_4 = 06a177eae05f164fac57f7a2c346ee87
178MD5_PPM_INT_13_8 = bc3452573c8152f6ae552939ee19f82f
179MD5_PPM_INT_3_2 = f5a8b88a8a7f96016f04d259cf82ed67
180MD5_PPM_INT_11_8 = d8cc73c0aaacd4556569b59437ba00a5
181MD5_PPM_INT_5_4 = 32775dd9ad2ab90f4c5b219b53e0c86c
182MD5_PPM_INT_9_8 = d25e61bc7eac0002f5b393aa223747b6
183MD5_PPM_INT_7_8 = ddb564b7c74a09494016d6cd7502a946
184MD5_PPM_INT_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646
185MD5_PPM_INT_5_8 = a3363274999da2366a024efae6d16c9b
186MD5_PPM_INT_1_2 = e692a315cea26b988c8e8b29a5dbcd81
187MD5_PPM_INT_3_8 = 79eca9175652ced755155c90e785a996
188MD5_PPM_INT_1_4 = 79cd778f8bf1a117690052cacdd54eca
189MD5_PPM_INT_1_8 = 391b3d4aca640c8567d6f8745eb2142f
190MD5_PPM_FAST_1_2 = f30bcf6d32ccd44cbdd9aeaacbd9454f
191MD5_BMP_256 = 4980185e3776e89bd931736e1cddeee6
192MD5_JPEG_ARI = e986fb0a637a8d833d96e8a6d6d84ea1
193MD5_PPM_ARI = 72b59a99bcf1de24c5b27d151bde2437
194MD5_JPEG_PROG = 1c4afddc05c0a43489ee54438a482d92
DRC4b509282013-11-06 06:55:28 +0000195MD5_JPEG_PROG_ARI = 0a8f1c8f66e113c3cf635df0a475a617
DRC211d1e72013-01-13 11:25:20 +0000196MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
197
DRC66f97e62010-11-23 05:49:54 +0000198test: testclean all
DRC211d1e72013-01-13 11:25:20 +0000199if WITH_TURBOJPEG
DRCf2602ce2011-04-01 00:20:33 +0000200if WITH_JAVA
201 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest
202 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -bi
203 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv
204 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi
205endif
DRC3185cb92011-05-25 03:52:22 +0000206 ./tjunittest
207 ./tjunittest -alloc
208 ./tjunittest -yuv
DRC211d1e72013-01-13 11:25:20 +0000209endif
DRC7ab03642012-01-31 05:47:07 +0000210 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm
DRC0bf58f22013-02-06 23:51:08 +0000211 md5/md5cmp $(MD5_JPEG_INT) testoutint.jpg
DRC7ab03642012-01-31 05:47:07 +0000212 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm
DRC0bf58f22013-02-06 23:51:08 +0000213 md5/md5cmp $(MD5_JPEG_FAST) testoutfst.jpg
DRC7ab03642012-01-31 05:47:07 +0000214 ./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm
DRC0bf58f22013-02-06 23:51:08 +0000215 md5/md5cmp $(MD5_JPEG_FAST_100) testoutfst100.jpg
DRC7ab03642012-01-31 05:47:07 +0000216 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm
DRC321e0682011-05-03 08:47:43 +0000217if WITH_SSE_FLOAT_DCT
DRC0bf58f22013-02-06 23:51:08 +0000218 md5/md5cmp $(MD5_JPEG_FLOAT) testoutflt.jpg
DRC83f21442010-06-10 18:52:41 +0000219else
DRC0bf58f22013-02-06 23:51:08 +0000220 md5/md5cmp $(MD5_JPEG_FLOAT_NOSIMD) testoutflt.jpg
DRC66f97e62010-11-23 05:49:54 +0000221endif
DRC7ab03642012-01-31 05:47:07 +0000222 ./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm
DRC0bf58f22013-02-06 23:51:08 +0000223 md5/md5cmp $(MD5_JPEG_INT_GRAY) testoutgray.jpg
DRC7ab03642012-01-31 05:47:07 +0000224 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg
DRC0bf58f22013-02-06 23:51:08 +0000225 md5/md5cmp $(MD5_PPM_INT) testoutint.ppm
DRC7ab03642012-01-31 05:47:07 +0000226 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg
DRC0bf58f22013-02-06 23:51:08 +0000227 md5/md5cmp $(MD5_PPM_FAST) testoutfst.ppm
DRC7ab03642012-01-31 05:47:07 +0000228 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg
DRC321e0682011-05-03 08:47:43 +0000229if WITH_SSE_FLOAT_DCT
DRC0bf58f22013-02-06 23:51:08 +0000230 md5/md5cmp $(MD5_PPM_FLOAT) testoutflt.ppm
DRC66f97e62010-11-23 05:49:54 +0000231else
DRC0bf58f22013-02-06 23:51:08 +0000232 md5/md5cmp $(MD5_PPM_FLOAT_NOSIMD) testoutflt.ppm
DRC66f97e62010-11-23 05:49:54 +0000233endif
DRC0bf58f22013-02-06 23:51:08 +0000234 ./djpeg -dct int -nosmooth -scale 2/1 -ppm -outfile testoutint2_1.ppm $(srcdir)/testimages/testorig.jpg;
235 md5/md5cmp $(MD5_PPM_INT_2_1) testoutint2_1.ppm;
236 ./djpeg -dct int -nosmooth -scale 15/8 -ppm -outfile testoutint15_8.ppm $(srcdir)/testimages/testorig.jpg;
237 md5/md5cmp $(MD5_PPM_INT_15_8) testoutint15_8.ppm;
238 ./djpeg -dct int -nosmooth -scale 7/4 -ppm -outfile testoutint7_4.ppm $(srcdir)/testimages/testorig.jpg;
239 md5/md5cmp $(MD5_PPM_INT_7_4) testoutint7_4.ppm;
240 ./djpeg -dct int -nosmooth -scale 13/8 -ppm -outfile testoutint13_8.ppm $(srcdir)/testimages/testorig.jpg;
241 md5/md5cmp $(MD5_PPM_INT_13_8) testoutint13_8.ppm;
242 ./djpeg -dct int -nosmooth -scale 3/2 -ppm -outfile testoutint3_2.ppm $(srcdir)/testimages/testorig.jpg;
243 md5/md5cmp $(MD5_PPM_INT_3_2) testoutint3_2.ppm;
244 ./djpeg -dct int -nosmooth -scale 11/8 -ppm -outfile testoutint11_8.ppm $(srcdir)/testimages/testorig.jpg;
245 md5/md5cmp $(MD5_PPM_INT_11_8) testoutint11_8.ppm;
246 ./djpeg -dct int -nosmooth -scale 5/4 -ppm -outfile testoutint5_4.ppm $(srcdir)/testimages/testorig.jpg;
247 md5/md5cmp $(MD5_PPM_INT_5_4) testoutint5_4.ppm;
248 ./djpeg -dct int -nosmooth -scale 9/8 -ppm -outfile testoutint9_8.ppm $(srcdir)/testimages/testorig.jpg;
249 md5/md5cmp $(MD5_PPM_INT_9_8) testoutint9_8.ppm;
250 ./djpeg -dct int -nosmooth -scale 7/8 -ppm -outfile testoutint7_8.ppm $(srcdir)/testimages/testorig.jpg;
251 md5/md5cmp $(MD5_PPM_INT_7_8) testoutint7_8.ppm;
252 ./djpeg -dct int -nosmooth -scale 3/4 -ppm -outfile testoutint3_4.ppm $(srcdir)/testimages/testorig.jpg;
253 md5/md5cmp $(MD5_PPM_INT_3_4) testoutint3_4.ppm;
254 ./djpeg -dct int -nosmooth -scale 5/8 -ppm -outfile testoutint5_8.ppm $(srcdir)/testimages/testorig.jpg;
255 md5/md5cmp $(MD5_PPM_INT_5_8) testoutint5_8.ppm;
256 ./djpeg -dct int -nosmooth -scale 1/2 -ppm -outfile testoutint1_2.ppm $(srcdir)/testimages/testorig.jpg;
257 md5/md5cmp $(MD5_PPM_INT_1_2) testoutint1_2.ppm;
258 ./djpeg -dct int -nosmooth -scale 3/8 -ppm -outfile testoutint3_8.ppm $(srcdir)/testimages/testorig.jpg;
259 md5/md5cmp $(MD5_PPM_INT_3_8) testoutint3_8.ppm;
260 ./djpeg -dct int -nosmooth -scale 1/4 -ppm -outfile testoutint1_4.ppm $(srcdir)/testimages/testorig.jpg;
261 md5/md5cmp $(MD5_PPM_INT_1_4) testoutint1_4.ppm;
262 ./djpeg -dct int -nosmooth -scale 1/8 -ppm -outfile testoutint1_8.ppm $(srcdir)/testimages/testorig.jpg;
263 md5/md5cmp $(MD5_PPM_INT_1_8) testoutint1_8.ppm;
DRC7ab03642012-01-31 05:47:07 +0000264 ./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg
DRC0bf58f22013-02-06 23:51:08 +0000265 md5/md5cmp $(MD5_PPM_FAST_1_2) testoutfst1_2.ppm
DRC211d1e72013-01-13 11:25:20 +0000266 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg
DRC0bf58f22013-02-06 23:51:08 +0000267 md5/md5cmp $(MD5_BMP_256) testout.bmp
DRCe3720042010-11-23 06:50:14 +0000268if WITH_ARITH_ENC
DRC7ab03642012-01-31 05:47:07 +0000269 ./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm
DRC0bf58f22013-02-06 23:51:08 +0000270 md5/md5cmp $(MD5_JPEG_ARI) testoutari.jpg
DRC7ab03642012-01-31 05:47:07 +0000271 ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg
DRC0bf58f22013-02-06 23:51:08 +0000272 md5/md5cmp $(MD5_JPEG_ARI) testouta.jpg
DRC4b509282013-11-06 06:55:28 +0000273 ./cjpeg -dct int -progressive -arithmetic -sample 1x1 -outfile testoutpa.jpg $(srcdir)/testimages/testorig.ppm
274 md5/md5cmp $(MD5_JPEG_PROG_ARI) testoutpa.jpg
DRCe3720042010-11-23 06:50:14 +0000275endif
276if WITH_ARITH_DEC
DRC7ab03642012-01-31 05:47:07 +0000277 ./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg
DRC0bf58f22013-02-06 23:51:08 +0000278 md5/md5cmp $(MD5_PPM_ARI) testoutari.ppm
DRC7ab03642012-01-31 05:47:07 +0000279 ./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg
DRC0bf58f22013-02-06 23:51:08 +0000280 md5/md5cmp $(MD5_JPEG_INT) testouta.jpg
DRCe3720042010-11-23 06:50:14 +0000281endif
DRC7ab03642012-01-31 05:47:07 +0000282 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm
DRC0bf58f22013-02-06 23:51:08 +0000283 md5/md5cmp $(MD5_JPEG_PROG) testoutp.jpg
DRC83f21442010-06-10 18:52:41 +0000284 ./jpegtran -outfile testoutt.jpg testoutp.jpg
DRC0bf58f22013-02-06 23:51:08 +0000285 md5/md5cmp $(MD5_JPEG_INT) testoutt.jpg
DRC7ab03642012-01-31 05:47:07 +0000286 ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg
DRC0bf58f22013-02-06 23:51:08 +0000287 md5/md5cmp $(MD5_JPEG_CROP) testoutcrop.jpg
DRC83f21442010-06-10 18:52:41 +0000288
DRC83f21442010-06-10 18:52:41 +0000289
DRC34d59e72010-02-12 06:27:34 +0000290testclean:
DRC7b991722010-06-10 19:44:56 +0000291 rm -f testout*
DRCf2602ce2011-04-01 00:20:33 +0000292 rm -f *_GRAY_*.bmp
293 rm -f *_GRAY_*.png
294 rm -f *_GRAY_*.ppm
295 rm -f *_GRAY_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000296 rm -f *_GRAY.yuv
DRCf2602ce2011-04-01 00:20:33 +0000297 rm -f *_420_*.bmp
298 rm -f *_420_*.png
299 rm -f *_420_*.ppm
300 rm -f *_420_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000301 rm -f *_420.yuv
DRCf2602ce2011-04-01 00:20:33 +0000302 rm -f *_422_*.bmp
303 rm -f *_422_*.png
304 rm -f *_422_*.ppm
305 rm -f *_422_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000306 rm -f *_422.yuv
DRCf2602ce2011-04-01 00:20:33 +0000307 rm -f *_444_*.bmp
308 rm -f *_444_*.png
309 rm -f *_444_*.ppm
310 rm -f *_444_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000311 rm -f *_444.yuv
DRCf2602ce2011-04-01 00:20:33 +0000312 rm -f *_440_*.bmp
313 rm -f *_440_*.png
314 rm -f *_440_*.ppm
315 rm -f *_440_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000316 rm -f *_440.yuv
DRC079b4342010-02-15 11:32:23 +0000317
DRCcb6157b2012-01-31 11:38:13 +0000318
319tjtest:
320 sh ./tjbenchtest
321if WITH_JAVA
DRCfac3bea2012-09-24 02:27:55 +0000322 sh ./tjbenchtest.java
DRCcb6157b2012-01-31 11:38:13 +0000323endif
324
325
DRC764e1e22013-04-19 04:25:14 +0000326pkgscripts/libjpeg-turbo.spec: pkgscripts/libjpeg-turbo.spec.tmpl
327 cat pkgscripts/libjpeg-turbo.spec.tmpl | sed s@%{__prefix}@$(prefix)@g | \
328 sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
329 sed s@%{__docdir}@$(docdir)@g | sed s@%{__includedir}@$(includedir)@g | \
330 sed s@%{__libdir}@$(libdir)@g | sed s@%{__mandir}@$(mandir)@g \
331 > pkgscripts/libjpeg-turbo.spec
DRCd1c281a2010-11-17 22:44:40 +0000332
DRC764e1e22013-04-19 04:25:14 +0000333rpm: all pkgscripts/libjpeg-turbo.spec
DRC1f80a102010-10-18 00:15:31 +0000334 TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
335 mkdir -p $$TMPDIR/RPMS; \
336 ln -fs `pwd` $$TMPDIR/BUILD; \
DRC764e1e22013-04-19 04:25:14 +0000337 rm -f ${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000338 rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
DRC57bd84f2012-02-10 01:40:29 +0000339 --define "_topdir $$TMPDIR" \
DRCb94f2de2011-03-22 09:31:25 +0000340 --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
DRC764e1e22013-04-19 04:25:14 +0000341 cp $$TMPDIR/RPMS/${RPMARCH}/${PKGNAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
342 ${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000343 rm -rf $$TMPDIR
DRC079b4342010-02-15 11:32:23 +0000344
DRC764e1e22013-04-19 04:25:14 +0000345srpm: dist-gzip pkgscripts/libjpeg-turbo.spec
DRC1f80a102010-10-18 00:15:31 +0000346 TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
347 mkdir -p $$TMPDIR/RPMS; \
348 mkdir -p $$TMPDIR/SRPMS; \
349 mkdir -p $$TMPDIR/BUILD; \
350 mkdir -p $$TMPDIR/SOURCES; \
351 mkdir -p $$TMPDIR/SPECS; \
DRC764e1e22013-04-19 04:25:14 +0000352 rm -f ${PKGNAME}-${VERSION}.src.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000353 cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
DRCb94f2de2011-03-22 09:31:25 +0000354 cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
DRC57bd84f2012-02-10 01:40:29 +0000355 | sed s/#--\>//g \
DRCb94f2de2011-03-22 09:31:25 +0000356 > $$TMPDIR/SPECS/libjpeg-turbo.spec; \
DRC1f80a102010-10-18 00:15:31 +0000357 rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
DRC764e1e22013-04-19 04:25:14 +0000358 cp $$TMPDIR/SRPMS/${PKGNAME}-${VERSION}-${BUILD}.src.rpm \
359 ${PKGNAME}-${VERSION}.src.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000360 rm -rf $$TMPDIR
DRC52a19f22010-02-15 12:06:27 +0000361
DRC764e1e22013-04-19 04:25:14 +0000362pkgscripts/makedpkg: pkgscripts/makedpkg.tmpl
363 cat pkgscripts/makedpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
DRC7175e512013-04-23 22:29:00 +0000364 sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
DRC764e1e22013-04-19 04:25:14 +0000365 > pkgscripts/makedpkg
366
367deb: all pkgscripts/makedpkg
DRCb94f2de2011-03-22 09:31:25 +0000368 sh pkgscripts/makedpkg
DRC6533b6e2010-02-15 14:57:18 +0000369
DRC7175e512013-04-23 22:29:00 +0000370pkgscripts/uninstall: pkgscripts/uninstall.tmpl
371 cat pkgscripts/uninstall.tmpl | sed s@%{__prefix}@$(prefix)@g | \
372 sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
373 sed s@%{__includedir}@$(includedir)@g | sed s@%{__libdir}@$(libdir)@g | \
374 sed s@%{__mandir}@$(mandir)@g > pkgscripts/uninstall
375
376pkgscripts/makemacpkg: pkgscripts/makemacpkg.tmpl
377 cat pkgscripts/makemacpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
378 sed s@%{__bindir}@$(bindir)@g | sed s@%{__docdir}@$(docdir)@g | \
379 sed s@%{__libdir}@$(libdir)@g > pkgscripts/makemacpkg
380
DRC315123f2010-02-15 16:14:26 +0000381if X86_64
382
DRC7175e512013-04-23 22:29:00 +0000383udmg: all pkgscripts/makemacpkg pkgscripts/uninstall
DRC7c6ae032012-03-23 00:51:56 +0000384 sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
DRC315123f2010-02-15 16:14:26 +0000385
DRC7175e512013-04-23 22:29:00 +0000386iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
DRCa2a2cd62013-02-04 22:29:57 +0000387 sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
DRC166c5ec2012-02-10 01:07:59 +0000388
389else
390
DRC7175e512013-04-23 22:29:00 +0000391iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
DRCa2a2cd62013-02-04 22:29:57 +0000392 sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
DRC1fbae842012-02-09 09:23:30 +0000393
DRC315123f2010-02-15 16:14:26 +0000394endif
395
DRC7175e512013-04-23 22:29:00 +0000396dmg: all pkgscripts/makemacpkg pkgscripts/uninstall
DRCb94f2de2011-03-22 09:31:25 +0000397 sh pkgscripts/makemacpkg
DRCb9b1ca32010-02-17 02:24:02 +0000398
DRC7175e512013-04-23 22:29:00 +0000399pkgscripts/makecygwinpkg: pkgscripts/makecygwinpkg.tmpl
400 cat pkgscripts/makecygwinpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
401 sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
402 > pkgscripts/makecygwinpkg
403
DRC764e1e22013-04-19 04:25:14 +0000404cygwinpkg: all pkgscripts/makecygwinpkg
DRCb94f2de2011-03-22 09:31:25 +0000405 sh pkgscripts/makecygwinpkg