DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 1 | lib_LTLIBRARIES = libjpeg.la |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 2 | libjpeg_la_LDFLAGS = -version-info ${SO_MAJOR_VERSION}:${SO_MINOR_VERSION}:${SO_AGE} -no-undefined |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 3 | include_HEADERS = jerror.h jmorecfg.h jpeglib.h |
| 4 | |
| 5 | if WITH_TURBOJPEG |
| 6 | lib_LTLIBRARIES += libturbojpeg.la |
DRC | fd40777 | 2012-03-23 03:24:39 +0000 | [diff] [blame] | 7 | libturbojpeg_la_LDFLAGS = -version-info 0:0 -no-undefined |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 8 | include_HEADERS += turbojpeg.h |
| 9 | endif |
| 10 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 11 | nodist_include_HEADERS = jconfig.h |
DRC | 0c0f304 | 2010-01-28 05:34:53 +0000 | [diff] [blame] | 12 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 13 | |
Adam Tkac | da5a1fe | 2008-10-22 11:19:25 +0000 | [diff] [blame] | 14 | HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 15 | jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 16 | |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 17 | libjpeg_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 | |
| 26 | if WITH_ARITH |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 27 | libjpeg_la_SOURCES += jaricom.c |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 28 | endif |
| 29 | |
| 30 | if WITH_ARITH_ENC |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 31 | libjpeg_la_SOURCES += jcarith.c |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 32 | endif |
| 33 | |
| 34 | if WITH_ARITH_DEC |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 35 | libjpeg_la_SOURCES += jdarith.c |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 36 | endif |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 37 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 38 | |
| 39 | SUBDIRS = java |
| 40 | |
| 41 | |
| 42 | if WITH_TURBOJPEG |
| 43 | |
DRC | 418dbdf | 2011-05-26 10:45:06 +0000 | [diff] [blame] | 44 | libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \ |
DRC | 9b28def | 2011-05-21 14:37:15 +0000 | [diff] [blame] | 45 | transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c |
DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame] | 46 | |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 47 | if WITH_JAVA |
DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame] | 48 | |
| 49 | libturbojpeg_la_SOURCES += turbojpeg-jni.c |
DRC | e08c05f | 2011-03-31 08:03:26 +0000 | [diff] [blame] | 50 | libturbojpeg_la_CFLAGS = ${JNI_CFLAGS} |
DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame] | 51 | TJMAPFILE = turbojpeg-mapfile.jni |
| 52 | |
| 53 | else |
| 54 | |
| 55 | TJMAPFILE = turbojpeg-mapfile |
| 56 | |
| 57 | endif |
| 58 | |
| 59 | libturbojpeg_la_SOURCES += $(TJMAPFILE) |
DRC | 6f8c668 | 2010-02-16 05:03:51 +0000 | [diff] [blame] | 60 | |
| 61 | if VERSION_SCRIPT |
DRC | 9fa9559 | 2011-02-25 00:23:44 +0000 | [diff] [blame] | 62 | libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/$(TJMAPFILE) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 63 | endif |
DRC | 6f8c668 | 2010-02-16 05:03:51 +0000 | [diff] [blame] | 64 | |
| 65 | endif |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 66 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 67 | |
| 68 | if VERSION_SCRIPT |
| 69 | libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map |
| 70 | endif |
| 71 | |
| 72 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 73 | if WITH_SIMD |
| 74 | |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 75 | SUBDIRS += simd |
Pierre Ossman | 3a65ef4 | 2009-03-16 13:34:18 +0000 | [diff] [blame] | 76 | libjpeg_la_LIBADD = simd/libsimd.la |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 77 | libturbojpeg_la_LIBADD = simd/libsimd.la |
Pierre Ossman | 2ae181c | 2009-03-09 13:21:27 +0000 | [diff] [blame] | 78 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 79 | else |
| 80 | |
| 81 | libjpeg_la_SOURCES += jsimd_none.c |
| 82 | |
| 83 | endif |
| 84 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 85 | |
| 86 | bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom |
| 87 | noinst_PROGRAMS = jcstest |
| 88 | |
| 89 | |
| 90 | if WITH_TURBOJPEG |
| 91 | |
| 92 | bin_PROGRAMS += tjbench |
| 93 | |
| 94 | noinst_PROGRAMS += tjunittest |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 95 | |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 96 | tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \ |
DRC | 18821f8 | 2011-05-24 17:07:51 +0000 | [diff] [blame] | 97 | wrbmp.c wrppm.c |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 98 | |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 99 | tjbench_LDADD = libturbojpeg.la libjpeg.la -lm |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 100 | |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 101 | tjbench_CFLAGS = -DBMP_SUPPORTED -DPPM_SUPPORTED |
DRC | be49b8c | 2011-05-24 13:41:27 +0000 | [diff] [blame] | 102 | |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 103 | tjunittest_SOURCES = tjunittest.c tjutil.h tjutil.c |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 104 | |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 105 | tjunittest_LDADD = libturbojpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 106 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 107 | endif |
| 108 | |
| 109 | |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 110 | cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \ |
| 111 | rdppm.c rdswitch.c rdtarga.c |
| 112 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 113 | cjpeg_LDADD = libjpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 114 | |
| 115 | cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \ |
| 116 | -DTARGA_SUPPORTED |
| 117 | |
| 118 | djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \ |
| 119 | wrbmp.c wrgif.c wrppm.c wrtarga.c |
| 120 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 121 | djpeg_LDADD = libjpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 122 | |
| 123 | djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \ |
| 124 | -DTARGA_SUPPORTED |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 125 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 126 | jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 127 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 128 | jpegtran_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 129 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 130 | rdjpgcom_SOURCES = rdjpgcom.c |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 131 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 132 | rdjpgcom_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 133 | |
| 134 | wrjpgcom_SOURCES = wrjpgcom.c |
| 135 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 136 | wrjpgcom_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 137 | |
DRC | b76c840 | 2011-12-19 15:01:55 +0000 | [diff] [blame] | 138 | jcstest_SOURCES = jcstest.c |
| 139 | |
| 140 | jcstest_LDADD = libjpeg.la |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 141 | |
DRC | cbda81a | 2010-06-05 01:12:35 +0000 | [diff] [blame] | 142 | dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 143 | |
DRC | 2f12d7a | 2013-01-13 01:19:09 +0000 | [diff] [blame] | 144 | DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.txt \ |
| 145 | ChangeLog.txt |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 146 | |
| 147 | docdir = $(datadir)/doc |
DRC | 01bf9d9 | 2012-02-10 01:52:31 +0000 | [diff] [blame] | 148 | dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \ |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 149 | wizard.txt |
| 150 | |
| 151 | exampledir = $(datadir)/doc |
DRC | 01bf9d9 | 2012-02-10 01:52:31 +0000 | [diff] [blame] | 152 | dist_example_DATA = example.c |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 153 | |
DRC | 750e078 | 2011-05-10 21:05:49 +0000 | [diff] [blame] | 154 | |
DRC | 0f43551 | 2013-01-13 11:40:58 +0000 | [diff] [blame] | 155 | EXTRA_DIST = win release $(DOCS) testimages md5cmp CMakeLists.txt \ |
DRC | a006fba | 2011-10-27 23:25:28 +0000 | [diff] [blame] | 156 | sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \ |
| 157 | jccolext.c jdcolext.c jdmrgext.c |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 158 | |
| 159 | dist-hook: |
| 160 | rm -rf `find $(distdir) -name .svn` |
| 161 | |
| 162 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 163 | MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f |
| 164 | MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f |
| 165 | MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c |
| 166 | MD5_JPEG_FLOAT = d1623885ffafcd40c684af09e3d65cd5 |
| 167 | MD5_JPEG_FLOAT_NOSIMD = fb4884c35f8273f498cb32879de5c455 |
| 168 | MD5_JPEG_INT_GRAY = 72b51f894b8f4a10b3ee3066770aa38d |
| 169 | MD5_PPM_INT = d1ed0d11f076b842525271647716aeb8 |
| 170 | MD5_PPM_FAST = 048298a2d2410261c0533cb97bcfef23 |
| 171 | MD5_PPM_FLOAT = 7f5b446ee36b2630e06785b8d42af15f |
| 172 | MD5_PPM_FLOAT_NOSIMD = 64072f1dbdc5b3a187777788604971a5 |
| 173 | MD5_PPM_INT_2_1 = 9f9de8c0612f8d06869b960b05abf9c9 |
| 174 | MD5_PPM_INT_15_8 = b6875bc070720b899566cc06459b63b7 |
| 175 | MD5_PPM_INT_7_4 = 06a177eae05f164fac57f7a2c346ee87 |
| 176 | MD5_PPM_INT_13_8 = bc3452573c8152f6ae552939ee19f82f |
| 177 | MD5_PPM_INT_3_2 = f5a8b88a8a7f96016f04d259cf82ed67 |
| 178 | MD5_PPM_INT_11_8 = d8cc73c0aaacd4556569b59437ba00a5 |
| 179 | MD5_PPM_INT_5_4 = 32775dd9ad2ab90f4c5b219b53e0c86c |
| 180 | MD5_PPM_INT_9_8 = d25e61bc7eac0002f5b393aa223747b6 |
| 181 | MD5_PPM_INT_7_8 = ddb564b7c74a09494016d6cd7502a946 |
| 182 | MD5_PPM_INT_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646 |
| 183 | MD5_PPM_INT_5_8 = a3363274999da2366a024efae6d16c9b |
| 184 | MD5_PPM_INT_1_2 = e692a315cea26b988c8e8b29a5dbcd81 |
| 185 | MD5_PPM_INT_3_8 = 79eca9175652ced755155c90e785a996 |
| 186 | MD5_PPM_INT_1_4 = 79cd778f8bf1a117690052cacdd54eca |
| 187 | MD5_PPM_INT_1_8 = 391b3d4aca640c8567d6f8745eb2142f |
| 188 | MD5_PPM_FAST_1_2 = f30bcf6d32ccd44cbdd9aeaacbd9454f |
| 189 | MD5_BMP_256 = 4980185e3776e89bd931736e1cddeee6 |
| 190 | MD5_JPEG_ARI = e986fb0a637a8d833d96e8a6d6d84ea1 |
| 191 | MD5_PPM_ARI = 72b59a99bcf1de24c5b27d151bde2437 |
| 192 | MD5_JPEG_PROG = 1c4afddc05c0a43489ee54438a482d92 |
| 193 | MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d |
| 194 | |
DRC | 66f97e6 | 2010-11-23 05:49:54 +0000 | [diff] [blame] | 195 | test: testclean all |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 196 | if WITH_TURBOJPEG |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 197 | if 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 |
| 202 | endif |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 203 | ./tjunittest |
| 204 | ./tjunittest -alloc |
| 205 | ./tjunittest -yuv |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 206 | endif |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 207 | ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 208 | sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testoutint.jpg |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 209 | ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 210 | sh $(srcdir)/md5cmp $(MD5_JPEG_FAST) testoutfst.jpg |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 211 | ./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 212 | sh $(srcdir)/md5cmp $(MD5_JPEG_FAST_100) testoutfst100.jpg |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 213 | ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 321e068 | 2011-05-03 08:47:43 +0000 | [diff] [blame] | 214 | if WITH_SSE_FLOAT_DCT |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 215 | sh $(srcdir)/md5cmp $(MD5_JPEG_FLOAT) testoutflt.jpg |
DRC | 83f2144 | 2010-06-10 18:52:41 +0000 | [diff] [blame] | 216 | else |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 217 | sh $(srcdir)/md5cmp $(MD5_JPEG_FLOAT_NOSIMD) testoutflt.jpg |
DRC | 66f97e6 | 2010-11-23 05:49:54 +0000 | [diff] [blame] | 218 | endif |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 219 | ./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 220 | sh $(srcdir)/md5cmp $(MD5_JPEG_INT_GRAY) testoutgray.jpg |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 221 | ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 222 | sh $(srcdir)/md5cmp $(MD5_PPM_INT) testoutint.ppm |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 223 | ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 224 | sh $(srcdir)/md5cmp $(MD5_PPM_FAST) testoutfst.ppm |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 225 | ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg |
DRC | 321e068 | 2011-05-03 08:47:43 +0000 | [diff] [blame] | 226 | if WITH_SSE_FLOAT_DCT |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 227 | sh $(srcdir)/md5cmp $(MD5_PPM_FLOAT) testoutflt.ppm |
DRC | 66f97e6 | 2010-11-23 05:49:54 +0000 | [diff] [blame] | 228 | else |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 229 | sh $(srcdir)/md5cmp $(MD5_PPM_FLOAT_NOSIMD) testoutflt.ppm |
DRC | 66f97e6 | 2010-11-23 05:49:54 +0000 | [diff] [blame] | 230 | endif |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 231 | 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); \ |
DRC | 3a5e362 | 2012-01-31 10:43:56 +0000 | [diff] [blame] | 246 | 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`; \ |
DRC | f29ffd3 | 2013-01-13 03:00:25 +0000 | [diff] [blame] | 248 | arrayindex=`echo $$scale | sed s@_@@g`; \ |
DRC | 3a5e362 | 2012-01-31 10:43:56 +0000 | [diff] [blame] | 249 | ./djpeg -dct int -nosmooth -scale $$scalearg -ppm -outfile testoutint$$scale.ppm $(srcdir)/testimages/testorig.jpg; \ |
DRC | f29ffd3 | 2013-01-13 03:00:25 +0000 | [diff] [blame] | 250 | sh $(srcdir)/md5cmp $${MD5[$$arrayindex]} testoutint$$scale.ppm; \ |
DRC | 3a5e362 | 2012-01-31 10:43:56 +0000 | [diff] [blame] | 251 | done |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 252 | ./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 253 | 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 |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 256 | if WITH_ARITH_ENC |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 257 | ./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 258 | sh $(srcdir)/md5cmp $(MD5_JPEG_ARI) testoutari.jpg |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 259 | ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 260 | sh $(srcdir)/md5cmp $(MD5_JPEG_ARI) testouta.jpg |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 261 | endif |
| 262 | if WITH_ARITH_DEC |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 263 | ./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 264 | sh $(srcdir)/md5cmp $(MD5_PPM_ARI) testoutari.ppm |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 265 | ./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 266 | sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testouta.jpg |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 267 | endif |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 268 | ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 269 | sh $(srcdir)/md5cmp $(MD5_JPEG_PROG) testoutp.jpg |
DRC | 83f2144 | 2010-06-10 18:52:41 +0000 | [diff] [blame] | 270 | ./jpegtran -outfile testoutt.jpg testoutp.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 271 | sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testoutt.jpg |
DRC | 7ab0364 | 2012-01-31 05:47:07 +0000 | [diff] [blame] | 272 | ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 273 | sh $(srcdir)/md5cmp $(MD5_JPEG_CROP) testoutcrop.jpg |
DRC | 83f2144 | 2010-06-10 18:52:41 +0000 | [diff] [blame] | 274 | |
DRC | 83f2144 | 2010-06-10 18:52:41 +0000 | [diff] [blame] | 275 | |
DRC | 34d59e7 | 2010-02-12 06:27:34 +0000 | [diff] [blame] | 276 | testclean: |
DRC | 7b99172 | 2010-06-10 19:44:56 +0000 | [diff] [blame] | 277 | rm -f testout* |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 278 | rm -f *_GRAY_*.bmp |
| 279 | rm -f *_GRAY_*.png |
| 280 | rm -f *_GRAY_*.ppm |
| 281 | rm -f *_GRAY_*.jpg |
DRC | ba6f457 | 2011-03-31 09:41:53 +0000 | [diff] [blame] | 282 | rm -f *_GRAY.yuv |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 283 | rm -f *_420_*.bmp |
| 284 | rm -f *_420_*.png |
| 285 | rm -f *_420_*.ppm |
| 286 | rm -f *_420_*.jpg |
DRC | ba6f457 | 2011-03-31 09:41:53 +0000 | [diff] [blame] | 287 | rm -f *_420.yuv |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 288 | rm -f *_422_*.bmp |
| 289 | rm -f *_422_*.png |
| 290 | rm -f *_422_*.ppm |
| 291 | rm -f *_422_*.jpg |
DRC | ba6f457 | 2011-03-31 09:41:53 +0000 | [diff] [blame] | 292 | rm -f *_422.yuv |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 293 | rm -f *_444_*.bmp |
| 294 | rm -f *_444_*.png |
| 295 | rm -f *_444_*.ppm |
| 296 | rm -f *_444_*.jpg |
DRC | ba6f457 | 2011-03-31 09:41:53 +0000 | [diff] [blame] | 297 | rm -f *_444.yuv |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 298 | rm -f *_440_*.bmp |
| 299 | rm -f *_440_*.png |
| 300 | rm -f *_440_*.ppm |
| 301 | rm -f *_440_*.jpg |
DRC | ba6f457 | 2011-03-31 09:41:53 +0000 | [diff] [blame] | 302 | rm -f *_440.yuv |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 303 | |
DRC | cb6157b | 2012-01-31 11:38:13 +0000 | [diff] [blame] | 304 | |
| 305 | tjtest: |
| 306 | sh ./tjbenchtest |
| 307 | if WITH_JAVA |
DRC | fac3bea | 2012-09-24 02:27:55 +0000 | [diff] [blame] | 308 | sh ./tjbenchtest.java |
DRC | cb6157b | 2012-01-31 11:38:13 +0000 | [diff] [blame] | 309 | endif |
| 310 | |
| 311 | |
DRC | d1c281a | 2010-11-17 22:44:40 +0000 | [diff] [blame] | 312 | if X86_64 |
| 313 | |
| 314 | install-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 | |
| 323 | else |
| 324 | |
| 325 | install-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 | |
| 334 | endif |
| 335 | |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 336 | rpm: all |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 337 | TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \ |
| 338 | mkdir -p $$TMPDIR/RPMS; \ |
| 339 | ln -fs `pwd` $$TMPDIR/BUILD; \ |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 340 | rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \ |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 341 | rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \ |
DRC | 57bd84f | 2012-02-10 01:40:29 +0000 | [diff] [blame] | 342 | --define "_topdir $$TMPDIR" \ |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 343 | --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \ |
| 344 | cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \ |
| 345 | ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \ |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 346 | rm -rf $$TMPDIR |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 347 | |
DRC | f26914b | 2010-02-15 11:36:46 +0000 | [diff] [blame] | 348 | srpm: dist-gzip |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 349 | 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; \ |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 355 | rm -f ${PACKAGE_NAME}-${VERSION}.src.rpm; \ |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 356 | cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \ |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 357 | cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \ |
DRC | 57bd84f | 2012-02-10 01:40:29 +0000 | [diff] [blame] | 358 | | sed s/#--\>//g \ |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 359 | > $$TMPDIR/SPECS/libjpeg-turbo.spec; \ |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 360 | rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \ |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 361 | cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm \ |
| 362 | ${PACKAGE_NAME}-${VERSION}.src.rpm; \ |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 363 | rm -rf $$TMPDIR |
DRC | 52a19f2 | 2010-02-15 12:06:27 +0000 | [diff] [blame] | 364 | |
| 365 | deb: all |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 366 | sh pkgscripts/makedpkg |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 367 | |
DRC | 315123f | 2010-02-15 16:14:26 +0000 | [diff] [blame] | 368 | if X86_64 |
| 369 | |
| 370 | udmg: all |
DRC | 7c6ae03 | 2012-03-23 00:51:56 +0000 | [diff] [blame] | 371 | sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} |
DRC | 315123f | 2010-02-15 16:14:26 +0000 | [diff] [blame] | 372 | |
DRC | 1fbae84 | 2012-02-09 09:23:30 +0000 | [diff] [blame] | 373 | iosdmg: all |
DRC | 7c6ae03 | 2012-03-23 00:51:56 +0000 | [diff] [blame] | 374 | sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} |
DRC | 166c5ec | 2012-02-10 01:07:59 +0000 | [diff] [blame] | 375 | |
| 376 | else |
| 377 | |
| 378 | iosdmg: all |
DRC | 7c6ae03 | 2012-03-23 00:51:56 +0000 | [diff] [blame] | 379 | sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} |
DRC | 1fbae84 | 2012-02-09 09:23:30 +0000 | [diff] [blame] | 380 | |
DRC | 315123f | 2010-02-15 16:14:26 +0000 | [diff] [blame] | 381 | endif |
| 382 | |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 383 | dmg: all |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 384 | sh pkgscripts/makemacpkg |
DRC | b9b1ca3 | 2010-02-17 02:24:02 +0000 | [diff] [blame] | 385 | |
DRC | ae79fdb | 2010-06-09 20:16:04 +0000 | [diff] [blame] | 386 | cygwinpkg: all |
DRC | b94f2de | 2011-03-22 09:31:25 +0000 | [diff] [blame] | 387 | sh pkgscripts/makecygwinpkg |