DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 1 | lib_LTLIBRARIES = libjpeg.la libturbojpeg.la |
DRC | a1e9878 | 2010-01-28 22:18:41 +0000 | [diff] [blame] | 2 | libjpeg_la_LDFLAGS = -version-number 62:0:0 -no-undefined |
DRC | 21d6683 | 2010-02-12 04:34:41 +0000 | [diff] [blame] | 3 | libturbojpeg_la_LDFLAGS = -avoid-version -no-undefined |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 4 | include_HEADERS = jerror.h jmorecfg.h jpeglib.h turbojpeg.h |
| 5 | nodist_include_HEADERS = jconfig.h |
DRC | 0c0f304 | 2010-01-28 05:34:53 +0000 | [diff] [blame] | 6 | |
Adam Tkac | da5a1fe | 2008-10-22 11:19:25 +0000 | [diff] [blame] | 7 | HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 8 | jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 9 | |
| 10 | libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \ |
| 11 | jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ |
| 12 | jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \ |
| 13 | jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ |
| 14 | jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ |
| 15 | jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \ |
| 16 | jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \ |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 17 | jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 18 | |
DRC | 6f8c668 | 2010-02-16 05:03:51 +0000 | [diff] [blame] | 19 | libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpegl.c turbojpeg.h \ |
| 20 | turbojpeg-mapfile |
| 21 | |
| 22 | if VERSION_SCRIPT |
| 23 | |
DRC | d86e4d9 | 2010-02-16 22:40:26 +0000 | [diff] [blame] | 24 | libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/turbojpeg-mapfile |
DRC | 6f8c668 | 2010-02-16 05:03:51 +0000 | [diff] [blame] | 25 | |
| 26 | endif |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 27 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 28 | if WITH_SIMD |
| 29 | |
Pierre Ossman | 3a65ef4 | 2009-03-16 13:34:18 +0000 | [diff] [blame] | 30 | SUBDIRS = simd |
| 31 | libjpeg_la_LIBADD = simd/libsimd.la |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 32 | libturbojpeg_la_LIBADD = simd/libsimd.la |
Pierre Ossman | 2ae181c | 2009-03-09 13:21:27 +0000 | [diff] [blame] | 33 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 34 | else |
| 35 | |
| 36 | libjpeg_la_SOURCES += jsimd_none.c |
| 37 | |
| 38 | endif |
| 39 | |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 40 | TSTHDRS = rrutil.h rrtimer.h |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 41 | |
DRC | 8e2bba9 | 2010-06-04 23:54:10 +0000 | [diff] [blame^] | 42 | bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom |
| 43 | noinst_PROGRAMS = jpgtest jpegut |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 44 | |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 45 | jpgtest_SOURCES = $(TSTHDRS) jpgtest.cxx bmp.h bmp.c |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 46 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 47 | jpgtest_LDADD = libturbojpeg.la |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 48 | |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 49 | jpegut_SOURCES = $(TSTHDRS) jpegut.c bmp.h bmp.c |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 50 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 51 | jpegut_LDADD = libturbojpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 52 | |
| 53 | cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \ |
| 54 | rdppm.c rdswitch.c rdtarga.c |
| 55 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 56 | cjpeg_LDADD = libjpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 57 | |
| 58 | cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \ |
| 59 | -DTARGA_SUPPORTED |
| 60 | |
| 61 | djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \ |
| 62 | wrbmp.c wrgif.c wrppm.c wrtarga.c |
| 63 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 64 | djpeg_LDADD = libjpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 65 | |
| 66 | djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \ |
| 67 | -DTARGA_SUPPORTED |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 68 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 69 | jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 70 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 71 | jpegtran_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 72 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 73 | rdjpgcom_SOURCES = rdjpgcom.c |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 74 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 75 | rdjpgcom_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 76 | |
| 77 | wrjpgcom_SOURCES = wrjpgcom.c |
| 78 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 79 | wrjpgcom_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 80 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 81 | |
DRC | 8e2bba9 | 2010-06-04 23:54:10 +0000 | [diff] [blame^] | 82 | man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 83 | |
| 84 | DOCS= README install.doc usage.doc wizard.doc example.c libjpeg.doc \ |
| 85 | structure.doc coderules.doc filelist.doc jconfig.doc change.log \ |
DRC | 0b7d4ed | 2010-03-03 09:37:58 +0000 | [diff] [blame] | 86 | README-turbo.txt rdrle.c wrrle.c LICENSE.txt LGPL.txt BUILDING.txt \ |
| 87 | ChangeLog.txt |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 88 | |
DRC | 968c8bb | 2010-02-22 22:50:13 +0000 | [diff] [blame] | 89 | TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \ |
| 90 | testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 91 | |
DRC | 8e2bba9 | 2010-06-04 23:54:10 +0000 | [diff] [blame^] | 92 | EXTRA_DIST = win release $(DOCS) $(TESTFILES) |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 93 | |
| 94 | dist-hook: |
| 95 | rm -rf `find $(distdir) -name .svn` |
| 96 | |
| 97 | |
DRC | 4924e49 | 2010-02-19 07:00:30 +0000 | [diff] [blame] | 98 | test: testclean cjpeg djpeg jpegtran jpegut |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 99 | ./jpegut |
DRC | 0fd8be5 | 2010-02-19 05:12:39 +0000 | [diff] [blame] | 100 | ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm |
| 101 | ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm |
| 102 | ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm |
| 103 | cmp $(srcdir)/testimgint.jpg testoutint.jpg |
| 104 | cmp $(srcdir)/testimgfst.jpg testoutfst.jpg |
| 105 | cmp $(srcdir)/testimgflt.jpg testoutflt.jpg |
| 106 | ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg |
| 107 | ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg |
| 108 | ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg |
| 109 | cmp $(srcdir)/testimgint.ppm testoutint.ppm |
| 110 | cmp $(srcdir)/testimgfst.ppm testoutfst.ppm |
| 111 | cmp $(srcdir)/testorig.ppm testoutflt.ppm |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 112 | ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg |
DRC | 6f52592 | 2010-02-15 11:10:08 +0000 | [diff] [blame] | 113 | cmp $(srcdir)/testimg.bmp testout.bmp |
DRC | 0fd8be5 | 2010-02-19 05:12:39 +0000 | [diff] [blame] | 114 | ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm |
DRC | 6f52592 | 2010-02-15 11:10:08 +0000 | [diff] [blame] | 115 | cmp $(srcdir)/testimgp.jpg testoutp.jpg |
DRC | 0fd8be5 | 2010-02-19 05:12:39 +0000 | [diff] [blame] | 116 | ./jpegtran -outfile testoutt.jpg testoutp.jpg |
| 117 | cmp $(srcdir)/testimgint.jpg testoutt.jpg |
DRC | 34d59e7 | 2010-02-12 06:27:34 +0000 | [diff] [blame] | 118 | |
| 119 | testclean: |
| 120 | $(RM) testout* |
| 121 | $(RM) *_GRAYQ[0-9]*.bmp |
| 122 | $(RM) *_GRAYQ[0-9]*.ppm |
| 123 | $(RM) *_GRAYQ[0-9]*.jpg |
| 124 | $(RM) *_420Q[0-9]*.bmp |
| 125 | $(RM) *_420Q[0-9]*.ppm |
| 126 | $(RM) *_420Q[0-9]*.jpg |
| 127 | $(RM) *_422Q[0-9]*.bmp |
| 128 | $(RM) *_422Q[0-9]*.ppm |
| 129 | $(RM) *_422Q[0-9]*.jpg |
| 130 | $(RM) *_444Q[0-9]*.bmp |
| 131 | $(RM) *_444Q[0-9]*.ppm |
| 132 | $(RM) *_444Q[0-9]*.jpg |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 133 | |
| 134 | rpm: all |
| 135 | sh $(srcdir)/release/makerpm ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 136 | ${RPMARCH} ${srcdir} |
| 137 | |
DRC | f26914b | 2010-02-15 11:36:46 +0000 | [diff] [blame] | 138 | srpm: dist-gzip |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 139 | sh $(srcdir)/release/makesrpm ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir} |
DRC | 52a19f2 | 2010-02-15 12:06:27 +0000 | [diff] [blame] | 140 | |
| 141 | deb: all |
| 142 | sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 143 | ${DEBARCH} ${srcdir} |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 144 | |
DRC | 315123f | 2010-02-15 16:14:26 +0000 | [diff] [blame] | 145 | if X86_64 |
| 146 | |
| 147 | udmg: all |
| 148 | sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 149 | ${srcdir} universal |
| 150 | |
| 151 | endif |
| 152 | |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 153 | dmg: all |
| 154 | sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir} |
DRC | b9b1ca3 | 2010-02-17 02:24:02 +0000 | [diff] [blame] | 155 | |
| 156 | if X86_64 |
| 157 | |
| 158 | sunpkg: all |
| 159 | sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 160 | ${DEBARCH} ${srcdir} $(CC) $(CXX) combined |
| 161 | |
DRC | 3dc1bc2 | 2010-05-10 22:18:10 +0000 | [diff] [blame] | 162 | nsi: all |
| 163 | makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc64 \ |
DRC | ef663e3 | 2010-05-10 23:39:22 +0000 | [diff] [blame] | 164 | -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. -DWIN64 \ |
DRC | 3dc1bc2 | 2010-05-10 22:18:10 +0000 | [diff] [blame] | 165 | -DPLATFORM="GCC 64-bit" -DGCC $(srcdir)/release/libjpeg-turbo.nsi |
| 166 | |
DRC | b9b1ca3 | 2010-02-17 02:24:02 +0000 | [diff] [blame] | 167 | else |
| 168 | |
| 169 | sunpkg: all |
| 170 | sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 171 | ${DEBARCH} ${srcdir} $(CC) $(CXX) |
| 172 | |
DRC | 0a1f68e | 2010-02-24 07:24:26 +0000 | [diff] [blame] | 173 | nsi: all |
| 174 | makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \ |
| 175 | -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \ |
| 176 | -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi |
DRC | 3dc1bc2 | 2010-05-10 22:18:10 +0000 | [diff] [blame] | 177 | |
| 178 | endif |