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 | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 42 | noinst_PROGRAMS = jpgtest jpegut cjpeg djpeg jpegtran rdjpgcom wrjpgcom |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 43 | |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 44 | jpgtest_SOURCES = $(TSTHDRS) jpgtest.cxx bmp.h bmp.c |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 45 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 46 | jpgtest_LDADD = libturbojpeg.la |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 47 | |
DRC | 1bf1a14 | 2010-02-11 06:39:32 +0000 | [diff] [blame] | 48 | jpegut_SOURCES = $(TSTHDRS) jpegut.c bmp.h bmp.c |
DRC | 2e7b76b | 2009-04-03 12:04:24 +0000 | [diff] [blame] | 49 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 50 | jpegut_LDADD = libturbojpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 51 | |
| 52 | cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \ |
| 53 | rdppm.c rdswitch.c rdtarga.c |
| 54 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 55 | cjpeg_LDADD = libjpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 56 | |
| 57 | cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \ |
| 58 | -DTARGA_SUPPORTED |
| 59 | |
| 60 | djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \ |
| 61 | wrbmp.c wrgif.c wrppm.c wrtarga.c |
| 62 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 63 | djpeg_LDADD = libjpeg.la |
DRC | 73de982 | 2009-06-25 20:41:17 +0000 | [diff] [blame] | 64 | |
| 65 | djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \ |
| 66 | -DTARGA_SUPPORTED |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 67 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 68 | jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 69 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 70 | jpegtran_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 71 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 72 | rdjpgcom_SOURCES = rdjpgcom.c |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 73 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 74 | rdjpgcom_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 75 | |
| 76 | wrjpgcom_SOURCES = wrjpgcom.c |
| 77 | |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 78 | wrjpgcom_LDADD = libjpeg.la |
DRC | 60fa060 | 2010-02-12 06:01:49 +0000 | [diff] [blame] | 79 | |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 80 | |
| 81 | DISTMANS= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 |
| 82 | |
| 83 | DOCS= README install.doc usage.doc wizard.doc example.c libjpeg.doc \ |
| 84 | structure.doc coderules.doc filelist.doc jconfig.doc change.log \ |
DRC | 68fef83 | 2010-02-16 05:29:10 +0000 | [diff] [blame] | 85 | README-turbo.txt rdrle.c wrrle.c LICENSE.txt LGPL.txt BUILDING.txt |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 86 | |
DRC | 968c8bb | 2010-02-22 22:50:13 +0000 | [diff] [blame] | 87 | TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \ |
| 88 | testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm |
DRC | 0a945a1 | 2010-02-15 11:04:51 +0000 | [diff] [blame] | 89 | |
| 90 | EXTRA_DIST = win release $(DOCS) $(DISTMANS) $(TESTFILES) |
| 91 | |
| 92 | dist-hook: |
| 93 | rm -rf `find $(distdir) -name .svn` |
| 94 | |
| 95 | |
DRC | 4924e49 | 2010-02-19 07:00:30 +0000 | [diff] [blame] | 96 | test: testclean cjpeg djpeg jpegtran jpegut |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 97 | ./jpegut |
DRC | 0fd8be5 | 2010-02-19 05:12:39 +0000 | [diff] [blame] | 98 | ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm |
| 99 | ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm |
| 100 | ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm |
| 101 | cmp $(srcdir)/testimgint.jpg testoutint.jpg |
| 102 | cmp $(srcdir)/testimgfst.jpg testoutfst.jpg |
| 103 | cmp $(srcdir)/testimgflt.jpg testoutflt.jpg |
| 104 | ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg |
| 105 | ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg |
| 106 | ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg |
| 107 | cmp $(srcdir)/testimgint.ppm testoutint.ppm |
| 108 | cmp $(srcdir)/testimgfst.ppm testoutfst.ppm |
| 109 | cmp $(srcdir)/testorig.ppm testoutflt.ppm |
DRC | 971d851 | 2010-02-13 22:55:05 +0000 | [diff] [blame] | 110 | ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg |
DRC | 6f52592 | 2010-02-15 11:10:08 +0000 | [diff] [blame] | 111 | cmp $(srcdir)/testimg.bmp testout.bmp |
DRC | 0fd8be5 | 2010-02-19 05:12:39 +0000 | [diff] [blame] | 112 | ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm |
DRC | 6f52592 | 2010-02-15 11:10:08 +0000 | [diff] [blame] | 113 | cmp $(srcdir)/testimgp.jpg testoutp.jpg |
DRC | 0fd8be5 | 2010-02-19 05:12:39 +0000 | [diff] [blame] | 114 | ./jpegtran -outfile testoutt.jpg testoutp.jpg |
| 115 | cmp $(srcdir)/testimgint.jpg testoutt.jpg |
DRC | 34d59e7 | 2010-02-12 06:27:34 +0000 | [diff] [blame] | 116 | |
| 117 | testclean: |
| 118 | $(RM) testout* |
| 119 | $(RM) *_GRAYQ[0-9]*.bmp |
| 120 | $(RM) *_GRAYQ[0-9]*.ppm |
| 121 | $(RM) *_GRAYQ[0-9]*.jpg |
| 122 | $(RM) *_420Q[0-9]*.bmp |
| 123 | $(RM) *_420Q[0-9]*.ppm |
| 124 | $(RM) *_420Q[0-9]*.jpg |
| 125 | $(RM) *_422Q[0-9]*.bmp |
| 126 | $(RM) *_422Q[0-9]*.ppm |
| 127 | $(RM) *_422Q[0-9]*.jpg |
| 128 | $(RM) *_444Q[0-9]*.bmp |
| 129 | $(RM) *_444Q[0-9]*.ppm |
| 130 | $(RM) *_444Q[0-9]*.jpg |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 131 | |
| 132 | rpm: all |
| 133 | sh $(srcdir)/release/makerpm ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 134 | ${RPMARCH} ${srcdir} |
| 135 | |
DRC | f26914b | 2010-02-15 11:36:46 +0000 | [diff] [blame] | 136 | srpm: dist-gzip |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 137 | sh $(srcdir)/release/makesrpm ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir} |
DRC | 52a19f2 | 2010-02-15 12:06:27 +0000 | [diff] [blame] | 138 | |
| 139 | deb: all |
| 140 | sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 141 | ${DEBARCH} ${srcdir} |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 142 | |
DRC | 315123f | 2010-02-15 16:14:26 +0000 | [diff] [blame] | 143 | if X86_64 |
| 144 | |
| 145 | udmg: all |
| 146 | sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 147 | ${srcdir} universal |
| 148 | |
| 149 | endif |
| 150 | |
DRC | 6533b6e | 2010-02-15 14:57:18 +0000 | [diff] [blame] | 151 | dmg: all |
| 152 | sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir} |
DRC | b9b1ca3 | 2010-02-17 02:24:02 +0000 | [diff] [blame] | 153 | |
| 154 | if X86_64 |
| 155 | |
| 156 | sunpkg: all |
| 157 | sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 158 | ${DEBARCH} ${srcdir} $(CC) $(CXX) combined |
| 159 | |
| 160 | else |
| 161 | |
| 162 | sunpkg: all |
| 163 | sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \ |
| 164 | ${DEBARCH} ${srcdir} $(CC) $(CXX) |
| 165 | |
| 166 | endif |
DRC | 0a1f68e | 2010-02-24 07:24:26 +0000 | [diff] [blame^] | 167 | |
| 168 | nsi: all |
| 169 | makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \ |
| 170 | -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \ |
| 171 | -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi |