blob: 87939453691d54030b20943640b8fa8264783514 [file] [log] [blame]
DRC1bf1a142010-02-11 06:39:32 +00001lib_LTLIBRARIES = libjpeg.la libturbojpeg.la
DRCa1e98782010-01-28 22:18:41 +00002libjpeg_la_LDFLAGS = -version-number 62:0:0 -no-undefined
DRC21d66832010-02-12 04:34:41 +00003libturbojpeg_la_LDFLAGS = -avoid-version -no-undefined
DRC0a945a12010-02-15 11:04:51 +00004include_HEADERS = jerror.h jmorecfg.h jpeglib.h turbojpeg.h
5nodist_include_HEADERS = jconfig.h
DRC0c0f3042010-01-28 05:34:53 +00006
Adam Tkacda5a1fe2008-10-22 11:19:25 +00007HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
DRC1bf1a142010-02-11 06:39:32 +00008 jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h
Constantin Kaplinsky0ca44252008-09-28 05:08:48 +00009
10libjpeg_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 Ossmanba82ddf2009-06-29 11:20:42 +000017 jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
Constantin Kaplinsky0ca44252008-09-28 05:08:48 +000018
DRC6f8c6682010-02-16 05:03:51 +000019libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpegl.c turbojpeg.h \
20 turbojpeg-mapfile
21
22if VERSION_SCRIPT
23
DRCd86e4d92010-02-16 22:40:26 +000024libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/turbojpeg-mapfile
DRC6f8c6682010-02-16 05:03:51 +000025
26endif
DRC1bf1a142010-02-11 06:39:32 +000027
DRC60cddeb2010-02-12 05:37:07 +000028if WITH_SIMD
29
Pierre Ossman3a65ef42009-03-16 13:34:18 +000030SUBDIRS = simd
31libjpeg_la_LIBADD = simd/libsimd.la
DRC1bf1a142010-02-11 06:39:32 +000032libturbojpeg_la_LIBADD = simd/libsimd.la
Pierre Ossman2ae181c2009-03-09 13:21:27 +000033
DRC60cddeb2010-02-12 05:37:07 +000034else
35
36libjpeg_la_SOURCES += jsimd_none.c
37
38endif
39
DRC1bf1a142010-02-11 06:39:32 +000040TSTHDRS = rrutil.h rrtimer.h
DRC2e7b76b2009-04-03 12:04:24 +000041
DRC8e2bba92010-06-04 23:54:10 +000042bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom
43noinst_PROGRAMS = jpgtest jpegut
DRC2e7b76b2009-04-03 12:04:24 +000044
DRC1bf1a142010-02-11 06:39:32 +000045jpgtest_SOURCES = $(TSTHDRS) jpgtest.cxx bmp.h bmp.c
DRC2e7b76b2009-04-03 12:04:24 +000046
DRC971d8512010-02-13 22:55:05 +000047jpgtest_LDADD = libturbojpeg.la
DRC2e7b76b2009-04-03 12:04:24 +000048
DRC1bf1a142010-02-11 06:39:32 +000049jpegut_SOURCES = $(TSTHDRS) jpegut.c bmp.h bmp.c
DRC2e7b76b2009-04-03 12:04:24 +000050
DRC971d8512010-02-13 22:55:05 +000051jpegut_LDADD = libturbojpeg.la
DRC73de9822009-06-25 20:41:17 +000052
53cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
54 rdppm.c rdswitch.c rdtarga.c
55
DRC971d8512010-02-13 22:55:05 +000056cjpeg_LDADD = libjpeg.la
DRC73de9822009-06-25 20:41:17 +000057
58cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
59 -DTARGA_SUPPORTED
60
61djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
62 wrbmp.c wrgif.c wrppm.c wrtarga.c
63
DRC971d8512010-02-13 22:55:05 +000064djpeg_LDADD = libjpeg.la
DRC73de9822009-06-25 20:41:17 +000065
66djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
67 -DTARGA_SUPPORTED
DRC60fa0602010-02-12 06:01:49 +000068
DRC0a945a12010-02-15 11:04:51 +000069jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
DRC60fa0602010-02-12 06:01:49 +000070
DRC971d8512010-02-13 22:55:05 +000071jpegtran_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +000072
DRC0a945a12010-02-15 11:04:51 +000073rdjpgcom_SOURCES = rdjpgcom.c
DRC60fa0602010-02-12 06:01:49 +000074
DRC971d8512010-02-13 22:55:05 +000075rdjpgcom_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +000076
77wrjpgcom_SOURCES = wrjpgcom.c
78
DRC971d8512010-02-13 22:55:05 +000079wrjpgcom_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +000080
DRC0a945a12010-02-15 11:04:51 +000081
DRCcbda81a2010-06-05 01:12:35 +000082dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
DRC0a945a12010-02-15 11:04:51 +000083
84DOCS= README install.doc usage.doc wizard.doc example.c libjpeg.doc \
85 structure.doc coderules.doc filelist.doc jconfig.doc change.log \
DRC0b7d4ed2010-03-03 09:37:58 +000086 README-turbo.txt rdrle.c wrrle.c LICENSE.txt LGPL.txt BUILDING.txt \
87 ChangeLog.txt
DRC0a945a12010-02-15 11:04:51 +000088
DRC968c8bb2010-02-22 22:50:13 +000089TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \
DRC13b09442010-06-10 18:56:27 +000090 testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm \
91 testimg-nosimd.bmp testimgfst-nosimd.ppm testorig-nosimd.ppm \
92 testimgflt-nosimd.jpg testimgint-nosimd.jpg testimgfst-nosimd.jpg \
93 testimgp-nosimd.jpg
DRC0a945a12010-02-15 11:04:51 +000094
DRC8e2bba92010-06-04 23:54:10 +000095EXTRA_DIST = win release $(DOCS) $(TESTFILES)
DRC0a945a12010-02-15 11:04:51 +000096
97dist-hook:
98 rm -rf `find $(distdir) -name .svn`
99
100
DRC83f21442010-06-10 18:52:41 +0000101if WITH_SIMD
102
DRC4924e492010-02-19 07:00:30 +0000103test: testclean cjpeg djpeg jpegtran jpegut
DRC971d8512010-02-13 22:55:05 +0000104 ./jpegut
DRC0fd8be52010-02-19 05:12:39 +0000105 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm
106 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm
107 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm
108 cmp $(srcdir)/testimgint.jpg testoutint.jpg
109 cmp $(srcdir)/testimgfst.jpg testoutfst.jpg
110 cmp $(srcdir)/testimgflt.jpg testoutflt.jpg
111 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
112 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
113 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
114 cmp $(srcdir)/testimgint.ppm testoutint.ppm
115 cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
DRC30959712010-08-07 16:06:56 +0000116 cmp $(srcdir)/testimgflt.ppm testoutflt.ppm
DRC971d8512010-02-13 22:55:05 +0000117 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
DRC6f525922010-02-15 11:10:08 +0000118 cmp $(srcdir)/testimg.bmp testout.bmp
DRC0fd8be52010-02-19 05:12:39 +0000119 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
DRC6f525922010-02-15 11:10:08 +0000120 cmp $(srcdir)/testimgp.jpg testoutp.jpg
DRC0fd8be52010-02-19 05:12:39 +0000121 ./jpegtran -outfile testoutt.jpg testoutp.jpg
122 cmp $(srcdir)/testimgint.jpg testoutt.jpg
DRC34d59e72010-02-12 06:27:34 +0000123
DRC83f21442010-06-10 18:52:41 +0000124else
125
126test: testclean cjpeg djpeg jpegtran jpegut
127 ./jpegut
DRC30959712010-08-07 16:06:56 +0000128 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm
129 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm
130 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm
131 cmp $(srcdir)/testimgint.jpg testoutint.jpg
132 cmp $(srcdir)/testimgfst.jpg testoutfst.jpg
DRC83f21442010-06-10 18:52:41 +0000133 cmp $(srcdir)/testimgflt-nosimd.jpg testoutflt.jpg
134 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
135 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
136 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
137 cmp $(srcdir)/testimgint.ppm testoutint.ppm
DRC30959712010-08-07 16:06:56 +0000138 cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
139 cmp $(srcdir)/testorig.ppm testoutflt.ppm
DRC83f21442010-06-10 18:52:41 +0000140 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
DRC30959712010-08-07 16:06:56 +0000141 cmp $(srcdir)/testimg.bmp testout.bmp
142 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
143 cmp $(srcdir)/testimgp.jpg testoutp.jpg
DRC83f21442010-06-10 18:52:41 +0000144 ./jpegtran -outfile testoutt.jpg testoutp.jpg
DRC30959712010-08-07 16:06:56 +0000145 cmp $(srcdir)/testimgint.jpg testoutt.jpg
DRC83f21442010-06-10 18:52:41 +0000146
147endif
148
DRC34d59e72010-02-12 06:27:34 +0000149testclean:
DRC7b991722010-06-10 19:44:56 +0000150 rm -f testout*
151 rm -f *_GRAYQ[0-9]*.bmp
152 rm -f *_GRAYQ[0-9]*.ppm
153 rm -f *_GRAYQ[0-9]*.jpg
154 rm -f *_420Q[0-9]*.bmp
155 rm -f *_420Q[0-9]*.ppm
156 rm -f *_420Q[0-9]*.jpg
157 rm -f *_422Q[0-9]*.bmp
158 rm -f *_422Q[0-9]*.ppm
159 rm -f *_422Q[0-9]*.jpg
160 rm -f *_444Q[0-9]*.bmp
161 rm -f *_444Q[0-9]*.ppm
162 rm -f *_444Q[0-9]*.jpg
DRC079b4342010-02-15 11:32:23 +0000163
164rpm: all
165 sh $(srcdir)/release/makerpm ${PACKAGE_NAME} ${VERSION} ${BUILD} \
166 ${RPMARCH} ${srcdir}
167
DRCf26914b2010-02-15 11:36:46 +0000168srpm: dist-gzip
DRC6533b6e2010-02-15 14:57:18 +0000169 sh $(srcdir)/release/makesrpm ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRC52a19f22010-02-15 12:06:27 +0000170
171deb: all
172 sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
173 ${DEBARCH} ${srcdir}
DRC6533b6e2010-02-15 14:57:18 +0000174
DRC315123f2010-02-15 16:14:26 +0000175if X86_64
176
177udmg: all
178 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
179 ${srcdir} universal
180
181endif
182
DRC6533b6e2010-02-15 14:57:18 +0000183dmg: all
184 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRCb9b1ca32010-02-17 02:24:02 +0000185
186if X86_64
187
188sunpkg: all
189 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
190 ${DEBARCH} ${srcdir} $(CC) $(CXX) combined
191
DRC3dc1bc22010-05-10 22:18:10 +0000192nsi: all
193 makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc64 \
DRCef663e32010-05-10 23:39:22 +0000194 -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. -DWIN64 \
DRC3dc1bc22010-05-10 22:18:10 +0000195 -DPLATFORM="GCC 64-bit" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
196
DRCb9b1ca32010-02-17 02:24:02 +0000197else
198
199sunpkg: all
200 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
201 ${DEBARCH} ${srcdir} $(CC) $(CXX)
202
DRC0a1f68e2010-02-24 07:24:26 +0000203nsi: all
204 makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \
205 -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \
206 -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
DRC3dc1bc22010-05-10 22:18:10 +0000207
208endif
DRCae79fdb2010-06-09 20:16:04 +0000209
210cygwinpkg: all
211 sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}