blob: c0100924b1ca9321fdbd2bdc0392106ef54345d4 [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 \
111 rdppm.c rdswitch.c rdtarga.c
112
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 \
DRCa1647c82012-02-10 00:39:05 +0000149 wizard.txt
150
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
DRC0f435512013-01-13 11:40:58 +0000155EXTRA_DIST = win release $(DOCS) testimages md5cmp 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
DRC211d1e72013-01-13 11:25:20 +0000163MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f
164MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f
165MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c
166MD5_JPEG_FLOAT = d1623885ffafcd40c684af09e3d65cd5
167MD5_JPEG_FLOAT_NOSIMD = fb4884c35f8273f498cb32879de5c455
168MD5_JPEG_INT_GRAY = 72b51f894b8f4a10b3ee3066770aa38d
169MD5_PPM_INT = d1ed0d11f076b842525271647716aeb8
170MD5_PPM_FAST = 048298a2d2410261c0533cb97bcfef23
171MD5_PPM_FLOAT = 7f5b446ee36b2630e06785b8d42af15f
172MD5_PPM_FLOAT_NOSIMD = 64072f1dbdc5b3a187777788604971a5
173MD5_PPM_INT_2_1 = 9f9de8c0612f8d06869b960b05abf9c9
174MD5_PPM_INT_15_8 = b6875bc070720b899566cc06459b63b7
175MD5_PPM_INT_7_4 = 06a177eae05f164fac57f7a2c346ee87
176MD5_PPM_INT_13_8 = bc3452573c8152f6ae552939ee19f82f
177MD5_PPM_INT_3_2 = f5a8b88a8a7f96016f04d259cf82ed67
178MD5_PPM_INT_11_8 = d8cc73c0aaacd4556569b59437ba00a5
179MD5_PPM_INT_5_4 = 32775dd9ad2ab90f4c5b219b53e0c86c
180MD5_PPM_INT_9_8 = d25e61bc7eac0002f5b393aa223747b6
181MD5_PPM_INT_7_8 = ddb564b7c74a09494016d6cd7502a946
182MD5_PPM_INT_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646
183MD5_PPM_INT_5_8 = a3363274999da2366a024efae6d16c9b
184MD5_PPM_INT_1_2 = e692a315cea26b988c8e8b29a5dbcd81
185MD5_PPM_INT_3_8 = 79eca9175652ced755155c90e785a996
186MD5_PPM_INT_1_4 = 79cd778f8bf1a117690052cacdd54eca
187MD5_PPM_INT_1_8 = 391b3d4aca640c8567d6f8745eb2142f
188MD5_PPM_FAST_1_2 = f30bcf6d32ccd44cbdd9aeaacbd9454f
189MD5_BMP_256 = 4980185e3776e89bd931736e1cddeee6
190MD5_JPEG_ARI = e986fb0a637a8d833d96e8a6d6d84ea1
191MD5_PPM_ARI = 72b59a99bcf1de24c5b27d151bde2437
192MD5_JPEG_PROG = 1c4afddc05c0a43489ee54438a482d92
193MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
194
DRC66f97e62010-11-23 05:49:54 +0000195test: testclean all
DRC211d1e72013-01-13 11:25:20 +0000196if WITH_TURBOJPEG
DRCf2602ce2011-04-01 00:20:33 +0000197if WITH_JAVA
198 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest
199 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -bi
200 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv
201 $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi
202endif
DRC3185cb92011-05-25 03:52:22 +0000203 ./tjunittest
204 ./tjunittest -alloc
205 ./tjunittest -yuv
DRC211d1e72013-01-13 11:25:20 +0000206endif
DRC7ab03642012-01-31 05:47:07 +0000207 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm
DRC211d1e72013-01-13 11:25:20 +0000208 sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testoutint.jpg
DRC7ab03642012-01-31 05:47:07 +0000209 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm
DRC211d1e72013-01-13 11:25:20 +0000210 sh $(srcdir)/md5cmp $(MD5_JPEG_FAST) testoutfst.jpg
DRC7ab03642012-01-31 05:47:07 +0000211 ./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm
DRC211d1e72013-01-13 11:25:20 +0000212 sh $(srcdir)/md5cmp $(MD5_JPEG_FAST_100) testoutfst100.jpg
DRC7ab03642012-01-31 05:47:07 +0000213 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm
DRC321e0682011-05-03 08:47:43 +0000214if WITH_SSE_FLOAT_DCT
DRC211d1e72013-01-13 11:25:20 +0000215 sh $(srcdir)/md5cmp $(MD5_JPEG_FLOAT) testoutflt.jpg
DRC83f21442010-06-10 18:52:41 +0000216else
DRC211d1e72013-01-13 11:25:20 +0000217 sh $(srcdir)/md5cmp $(MD5_JPEG_FLOAT_NOSIMD) testoutflt.jpg
DRC66f97e62010-11-23 05:49:54 +0000218endif
DRC7ab03642012-01-31 05:47:07 +0000219 ./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm
DRC211d1e72013-01-13 11:25:20 +0000220 sh $(srcdir)/md5cmp $(MD5_JPEG_INT_GRAY) testoutgray.jpg
DRC7ab03642012-01-31 05:47:07 +0000221 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg
DRC211d1e72013-01-13 11:25:20 +0000222 sh $(srcdir)/md5cmp $(MD5_PPM_INT) testoutint.ppm
DRC7ab03642012-01-31 05:47:07 +0000223 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg
DRC211d1e72013-01-13 11:25:20 +0000224 sh $(srcdir)/md5cmp $(MD5_PPM_FAST) testoutfst.ppm
DRC7ab03642012-01-31 05:47:07 +0000225 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg
DRC321e0682011-05-03 08:47:43 +0000226if WITH_SSE_FLOAT_DCT
DRC211d1e72013-01-13 11:25:20 +0000227 sh $(srcdir)/md5cmp $(MD5_PPM_FLOAT) testoutflt.ppm
DRC66f97e62010-11-23 05:49:54 +0000228else
DRC211d1e72013-01-13 11:25:20 +0000229 sh $(srcdir)/md5cmp $(MD5_PPM_FLOAT_NOSIMD) testoutflt.ppm
DRC66f97e62010-11-23 05:49:54 +0000230endif
DRC211d1e72013-01-13 11:25:20 +0000231 MD5[21]=$(MD5_PPM_INT_2_1); \
232 MD5[158]=$(MD5_PPM_INT_15_8); \
233 MD5[74]=$(MD5_PPM_INT_7_4); \
234 MD5[138]=$(MD5_PPM_INT_13_8); \
235 MD5[32]=$(MD5_PPM_INT_3_2); \
236 MD5[118]=$(MD5_PPM_INT_11_8); \
237 MD5[54]=$(MD5_PPM_INT_5_4); \
238 MD5[98]=$(MD5_PPM_INT_9_8); \
239 MD5[78]=$(MD5_PPM_INT_7_8); \
240 MD5[34]=$(MD5_PPM_INT_3_4); \
241 MD5[58]=$(MD5_PPM_INT_5_8); \
242 MD5[12]=$(MD5_PPM_INT_1_2); \
243 MD5[38]=$(MD5_PPM_INT_3_8); \
244 MD5[14]=$(MD5_PPM_INT_1_4); \
245 MD5[18]=$(MD5_PPM_INT_1_8); \
DRC3a5e3622012-01-31 10:43:56 +0000246 for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do \
247 scalearg=`echo $$scale | sed s@_@/@g`; \
DRCf29ffd32013-01-13 03:00:25 +0000248 arrayindex=`echo $$scale | sed s@_@@g`; \
DRC3a5e3622012-01-31 10:43:56 +0000249 ./djpeg -dct int -nosmooth -scale $$scalearg -ppm -outfile testoutint$$scale.ppm $(srcdir)/testimages/testorig.jpg; \
DRCf29ffd32013-01-13 03:00:25 +0000250 sh $(srcdir)/md5cmp $${MD5[$$arrayindex]} testoutint$$scale.ppm; \
DRC3a5e3622012-01-31 10:43:56 +0000251 done
DRC7ab03642012-01-31 05:47:07 +0000252 ./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg
DRC211d1e72013-01-13 11:25:20 +0000253 sh $(srcdir)/md5cmp $(MD5_PPM_FAST_1_2) testoutfst1_2.ppm
254 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg
255 sh $(srcdir)/md5cmp $(MD5_BMP_256) testout.bmp
DRCe3720042010-11-23 06:50:14 +0000256if WITH_ARITH_ENC
DRC7ab03642012-01-31 05:47:07 +0000257 ./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm
DRC211d1e72013-01-13 11:25:20 +0000258 sh $(srcdir)/md5cmp $(MD5_JPEG_ARI) testoutari.jpg
DRC7ab03642012-01-31 05:47:07 +0000259 ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg
DRC211d1e72013-01-13 11:25:20 +0000260 sh $(srcdir)/md5cmp $(MD5_JPEG_ARI) testouta.jpg
DRCe3720042010-11-23 06:50:14 +0000261endif
262if WITH_ARITH_DEC
DRC7ab03642012-01-31 05:47:07 +0000263 ./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg
DRC211d1e72013-01-13 11:25:20 +0000264 sh $(srcdir)/md5cmp $(MD5_PPM_ARI) testoutari.ppm
DRC7ab03642012-01-31 05:47:07 +0000265 ./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg
DRC211d1e72013-01-13 11:25:20 +0000266 sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testouta.jpg
DRCe3720042010-11-23 06:50:14 +0000267endif
DRC7ab03642012-01-31 05:47:07 +0000268 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm
DRC211d1e72013-01-13 11:25:20 +0000269 sh $(srcdir)/md5cmp $(MD5_JPEG_PROG) testoutp.jpg
DRC83f21442010-06-10 18:52:41 +0000270 ./jpegtran -outfile testoutt.jpg testoutp.jpg
DRC211d1e72013-01-13 11:25:20 +0000271 sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testoutt.jpg
DRC7ab03642012-01-31 05:47:07 +0000272 ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg
DRC211d1e72013-01-13 11:25:20 +0000273 sh $(srcdir)/md5cmp $(MD5_JPEG_CROP) testoutcrop.jpg
DRC83f21442010-06-10 18:52:41 +0000274
DRC83f21442010-06-10 18:52:41 +0000275
DRC34d59e72010-02-12 06:27:34 +0000276testclean:
DRC7b991722010-06-10 19:44:56 +0000277 rm -f testout*
DRCf2602ce2011-04-01 00:20:33 +0000278 rm -f *_GRAY_*.bmp
279 rm -f *_GRAY_*.png
280 rm -f *_GRAY_*.ppm
281 rm -f *_GRAY_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000282 rm -f *_GRAY.yuv
DRCf2602ce2011-04-01 00:20:33 +0000283 rm -f *_420_*.bmp
284 rm -f *_420_*.png
285 rm -f *_420_*.ppm
286 rm -f *_420_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000287 rm -f *_420.yuv
DRCf2602ce2011-04-01 00:20:33 +0000288 rm -f *_422_*.bmp
289 rm -f *_422_*.png
290 rm -f *_422_*.ppm
291 rm -f *_422_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000292 rm -f *_422.yuv
DRCf2602ce2011-04-01 00:20:33 +0000293 rm -f *_444_*.bmp
294 rm -f *_444_*.png
295 rm -f *_444_*.ppm
296 rm -f *_444_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000297 rm -f *_444.yuv
DRCf2602ce2011-04-01 00:20:33 +0000298 rm -f *_440_*.bmp
299 rm -f *_440_*.png
300 rm -f *_440_*.ppm
301 rm -f *_440_*.jpg
DRCba6f4572011-03-31 09:41:53 +0000302 rm -f *_440.yuv
DRC079b4342010-02-15 11:32:23 +0000303
DRCcb6157b2012-01-31 11:38:13 +0000304
305tjtest:
306 sh ./tjbenchtest
307if WITH_JAVA
DRCfac3bea2012-09-24 02:27:55 +0000308 sh ./tjbenchtest.java
DRCcb6157b2012-01-31 11:38:13 +0000309endif
310
311
DRCd1c281a2010-11-17 22:44:40 +0000312if X86_64
313
314install-exec-hook:
315 __PREFIX=`echo ${prefix} | sed -e 's@\/*$$@@'`; \
316 if [ "$$__PREFIX" = "/opt/libjpeg-turbo" ]; then \
317 cd $(DESTDIR)/${prefix}; \
318 if [ -d lib -a ! -d lib64 -a ! -h lib64 ]; then \
319 $(LN_S) lib lib64; \
320 fi \
321 fi
322
323else
324
325install-exec-hook:
326 __PREFIX=`echo ${prefix} | sed -e 's@\/*$$@@'`; \
327 if [ "$$__PREFIX" = "/opt/libjpeg-turbo" ]; then \
328 cd $(DESTDIR)/${prefix}; \
329 if [ -d lib -a ! -d lib32 -a ! -h lib32 ]; then \
330 $(LN_S) lib lib32; \
331 fi \
332 fi
333
334endif
335
DRC079b4342010-02-15 11:32:23 +0000336rpm: all
DRC1f80a102010-10-18 00:15:31 +0000337 TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
338 mkdir -p $$TMPDIR/RPMS; \
339 ln -fs `pwd` $$TMPDIR/BUILD; \
DRCb94f2de2011-03-22 09:31:25 +0000340 rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000341 rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
DRC57bd84f2012-02-10 01:40:29 +0000342 --define "_topdir $$TMPDIR" \
DRCb94f2de2011-03-22 09:31:25 +0000343 --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
344 cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
345 ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000346 rm -rf $$TMPDIR
DRC079b4342010-02-15 11:32:23 +0000347
DRCf26914b2010-02-15 11:36:46 +0000348srpm: dist-gzip
DRC1f80a102010-10-18 00:15:31 +0000349 TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
350 mkdir -p $$TMPDIR/RPMS; \
351 mkdir -p $$TMPDIR/SRPMS; \
352 mkdir -p $$TMPDIR/BUILD; \
353 mkdir -p $$TMPDIR/SOURCES; \
354 mkdir -p $$TMPDIR/SPECS; \
DRCb94f2de2011-03-22 09:31:25 +0000355 rm -f ${PACKAGE_NAME}-${VERSION}.src.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000356 cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
DRCb94f2de2011-03-22 09:31:25 +0000357 cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
DRC57bd84f2012-02-10 01:40:29 +0000358 | sed s/#--\>//g \
DRCb94f2de2011-03-22 09:31:25 +0000359 > $$TMPDIR/SPECS/libjpeg-turbo.spec; \
DRC1f80a102010-10-18 00:15:31 +0000360 rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
DRCb94f2de2011-03-22 09:31:25 +0000361 cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm \
362 ${PACKAGE_NAME}-${VERSION}.src.rpm; \
DRC1f80a102010-10-18 00:15:31 +0000363 rm -rf $$TMPDIR
DRC52a19f22010-02-15 12:06:27 +0000364
365deb: all
DRCb94f2de2011-03-22 09:31:25 +0000366 sh pkgscripts/makedpkg
DRC6533b6e2010-02-15 14:57:18 +0000367
DRC315123f2010-02-15 16:14:26 +0000368if X86_64
369
370udmg: all
DRC7c6ae032012-03-23 00:51:56 +0000371 sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
DRC315123f2010-02-15 16:14:26 +0000372
DRC1fbae842012-02-09 09:23:30 +0000373iosdmg: all
DRC7c6ae032012-03-23 00:51:56 +0000374 sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7}
DRC166c5ec2012-02-10 01:07:59 +0000375
376else
377
378iosdmg: all
DRC7c6ae032012-03-23 00:51:56 +0000379 sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7}
DRC1fbae842012-02-09 09:23:30 +0000380
DRC315123f2010-02-15 16:14:26 +0000381endif
382
DRC6533b6e2010-02-15 14:57:18 +0000383dmg: all
DRCb94f2de2011-03-22 09:31:25 +0000384 sh pkgscripts/makemacpkg
DRCb9b1ca32010-02-17 02:24:02 +0000385
DRCae79fdb2010-06-09 20:16:04 +0000386cygwinpkg: all
DRCb94f2de2011-03-22 09:31:25 +0000387 sh pkgscripts/makecygwinpkg