blob: c8791b24bb7fc3ca261d61a569998298b2d5ba34 [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 \
DRC50503c72010-09-09 21:00:31 +000090 testimgfst.jpg testimgint.jpg testimgp.jpg testimgflt.ppm testimgfst.ppm \
91 testimgint.ppm testimgflt-nosimd.jpg
DRC0a945a12010-02-15 11:04:51 +000092
DRC8e2bba92010-06-04 23:54:10 +000093EXTRA_DIST = win release $(DOCS) $(TESTFILES)
DRC0a945a12010-02-15 11:04:51 +000094
95dist-hook:
96 rm -rf `find $(distdir) -name .svn`
97
98
DRC83f21442010-06-10 18:52:41 +000099if WITH_SIMD
100
DRC4924e492010-02-19 07:00:30 +0000101test: testclean cjpeg djpeg jpegtran jpegut
DRC971d8512010-02-13 22:55:05 +0000102 ./jpegut
DRC0fd8be52010-02-19 05:12:39 +0000103 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm
104 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm
105 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm
106 cmp $(srcdir)/testimgint.jpg testoutint.jpg
107 cmp $(srcdir)/testimgfst.jpg testoutfst.jpg
108 cmp $(srcdir)/testimgflt.jpg testoutflt.jpg
109 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
110 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
111 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
112 cmp $(srcdir)/testimgint.ppm testoutint.ppm
113 cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
DRC30959712010-08-07 16:06:56 +0000114 cmp $(srcdir)/testimgflt.ppm testoutflt.ppm
DRC971d8512010-02-13 22:55:05 +0000115 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
DRC6f525922010-02-15 11:10:08 +0000116 cmp $(srcdir)/testimg.bmp testout.bmp
DRC0fd8be52010-02-19 05:12:39 +0000117 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
DRC6f525922010-02-15 11:10:08 +0000118 cmp $(srcdir)/testimgp.jpg testoutp.jpg
DRC0fd8be52010-02-19 05:12:39 +0000119 ./jpegtran -outfile testoutt.jpg testoutp.jpg
120 cmp $(srcdir)/testimgint.jpg testoutt.jpg
DRC34d59e72010-02-12 06:27:34 +0000121
DRC83f21442010-06-10 18:52:41 +0000122else
123
124test: testclean cjpeg djpeg jpegtran jpegut
125 ./jpegut
DRC30959712010-08-07 16:06:56 +0000126 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm
127 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm
128 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm
129 cmp $(srcdir)/testimgint.jpg testoutint.jpg
130 cmp $(srcdir)/testimgfst.jpg testoutfst.jpg
DRC83f21442010-06-10 18:52:41 +0000131 cmp $(srcdir)/testimgflt-nosimd.jpg testoutflt.jpg
132 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
133 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
134 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
135 cmp $(srcdir)/testimgint.ppm testoutint.ppm
DRC30959712010-08-07 16:06:56 +0000136 cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
137 cmp $(srcdir)/testorig.ppm testoutflt.ppm
DRC83f21442010-06-10 18:52:41 +0000138 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
DRC30959712010-08-07 16:06:56 +0000139 cmp $(srcdir)/testimg.bmp testout.bmp
140 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
141 cmp $(srcdir)/testimgp.jpg testoutp.jpg
DRC83f21442010-06-10 18:52:41 +0000142 ./jpegtran -outfile testoutt.jpg testoutp.jpg
DRC30959712010-08-07 16:06:56 +0000143 cmp $(srcdir)/testimgint.jpg testoutt.jpg
DRC83f21442010-06-10 18:52:41 +0000144
145endif
146
DRC34d59e72010-02-12 06:27:34 +0000147testclean:
DRC7b991722010-06-10 19:44:56 +0000148 rm -f testout*
149 rm -f *_GRAYQ[0-9]*.bmp
150 rm -f *_GRAYQ[0-9]*.ppm
151 rm -f *_GRAYQ[0-9]*.jpg
152 rm -f *_420Q[0-9]*.bmp
153 rm -f *_420Q[0-9]*.ppm
154 rm -f *_420Q[0-9]*.jpg
155 rm -f *_422Q[0-9]*.bmp
156 rm -f *_422Q[0-9]*.ppm
157 rm -f *_422Q[0-9]*.jpg
158 rm -f *_444Q[0-9]*.bmp
159 rm -f *_444Q[0-9]*.ppm
160 rm -f *_444Q[0-9]*.jpg
DRC079b4342010-02-15 11:32:23 +0000161
162rpm: all
163 sh $(srcdir)/release/makerpm ${PACKAGE_NAME} ${VERSION} ${BUILD} \
164 ${RPMARCH} ${srcdir}
165
DRCf26914b2010-02-15 11:36:46 +0000166srpm: dist-gzip
DRC6533b6e2010-02-15 14:57:18 +0000167 sh $(srcdir)/release/makesrpm ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRC52a19f22010-02-15 12:06:27 +0000168
169deb: all
170 sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
171 ${DEBARCH} ${srcdir}
DRC6533b6e2010-02-15 14:57:18 +0000172
DRC315123f2010-02-15 16:14:26 +0000173if X86_64
174
175udmg: all
176 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
177 ${srcdir} universal
178
179endif
180
DRC6533b6e2010-02-15 14:57:18 +0000181dmg: all
182 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRCb9b1ca32010-02-17 02:24:02 +0000183
184if X86_64
185
186sunpkg: all
187 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
188 ${DEBARCH} ${srcdir} $(CC) $(CXX) combined
189
DRC3dc1bc22010-05-10 22:18:10 +0000190nsi: all
191 makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc64 \
DRCef663e32010-05-10 23:39:22 +0000192 -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. -DWIN64 \
DRC3dc1bc22010-05-10 22:18:10 +0000193 -DPLATFORM="GCC 64-bit" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
194
DRCb9b1ca32010-02-17 02:24:02 +0000195else
196
197sunpkg: all
198 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
199 ${DEBARCH} ${srcdir} $(CC) $(CXX)
200
DRC0a1f68e2010-02-24 07:24:26 +0000201nsi: all
202 makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \
203 -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \
204 -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
DRC3dc1bc22010-05-10 22:18:10 +0000205
206endif
DRCae79fdb2010-06-09 20:16:04 +0000207
208cygwinpkg: all
209 sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}