blob: 5c0d46b394bd3602a5315f4162efd48ec73433cb [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 \
90 testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm
DRC0a945a12010-02-15 11:04:51 +000091
DRC8e2bba92010-06-04 23:54:10 +000092EXTRA_DIST = win release $(DOCS) $(TESTFILES)
DRC0a945a12010-02-15 11:04:51 +000093
94dist-hook:
95 rm -rf `find $(distdir) -name .svn`
96
97
DRC83f21442010-06-10 18:52:41 +000098if WITH_SIMD
99
DRC4924e492010-02-19 07:00:30 +0000100test: testclean cjpeg djpeg jpegtran jpegut
DRC971d8512010-02-13 22:55:05 +0000101 ./jpegut
DRC0fd8be52010-02-19 05:12:39 +0000102 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm
103 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm
104 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm
105 cmp $(srcdir)/testimgint.jpg testoutint.jpg
106 cmp $(srcdir)/testimgfst.jpg testoutfst.jpg
107 cmp $(srcdir)/testimgflt.jpg testoutflt.jpg
108 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
109 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
110 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
111 cmp $(srcdir)/testimgint.ppm testoutint.ppm
112 cmp $(srcdir)/testimgfst.ppm testoutfst.ppm
113 cmp $(srcdir)/testorig.ppm testoutflt.ppm
DRC971d8512010-02-13 22:55:05 +0000114 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
DRC6f525922010-02-15 11:10:08 +0000115 cmp $(srcdir)/testimg.bmp testout.bmp
DRC0fd8be52010-02-19 05:12:39 +0000116 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
DRC6f525922010-02-15 11:10:08 +0000117 cmp $(srcdir)/testimgp.jpg testoutp.jpg
DRC0fd8be52010-02-19 05:12:39 +0000118 ./jpegtran -outfile testoutt.jpg testoutp.jpg
119 cmp $(srcdir)/testimgint.jpg testoutt.jpg
DRC34d59e72010-02-12 06:27:34 +0000120
DRC83f21442010-06-10 18:52:41 +0000121else
122
123test: testclean cjpeg djpeg jpegtran jpegut
124 ./jpegut
125 ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig-nosimd.ppm
126 ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig-nosimd.ppm
127 ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig-nosimd.ppm
128 cmp $(srcdir)/testimgint-nosimd.jpg testoutint.jpg
129 cmp $(srcdir)/testimgfst-nosimd.jpg testoutfst.jpg
130 cmp $(srcdir)/testimgflt-nosimd.jpg testoutflt.jpg
131 ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg
132 ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg
133 ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg
134 cmp $(srcdir)/testimgint.ppm testoutint.ppm
135 cmp $(srcdir)/testimgfst-nosimd.ppm testoutfst.ppm
136 cmp $(srcdir)/testorig-nosimd.ppm testoutflt.ppm
137 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
138 cmp $(srcdir)/testimg-nosimd.bmp testout.bmp
139 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig-nosimd.ppm
140 cmp $(srcdir)/testimgp-nosimd.jpg testoutp.jpg
141 ./jpegtran -outfile testoutt.jpg testoutp.jpg
142 cmp $(srcdir)/testimgint-nosimd.jpg testoutt.jpg
143
144endif
145
DRC34d59e72010-02-12 06:27:34 +0000146testclean:
147 $(RM) testout*
148 $(RM) *_GRAYQ[0-9]*.bmp
149 $(RM) *_GRAYQ[0-9]*.ppm
150 $(RM) *_GRAYQ[0-9]*.jpg
151 $(RM) *_420Q[0-9]*.bmp
152 $(RM) *_420Q[0-9]*.ppm
153 $(RM) *_420Q[0-9]*.jpg
154 $(RM) *_422Q[0-9]*.bmp
155 $(RM) *_422Q[0-9]*.ppm
156 $(RM) *_422Q[0-9]*.jpg
157 $(RM) *_444Q[0-9]*.bmp
158 $(RM) *_444Q[0-9]*.ppm
159 $(RM) *_444Q[0-9]*.jpg
DRC079b4342010-02-15 11:32:23 +0000160
161rpm: all
162 sh $(srcdir)/release/makerpm ${PACKAGE_NAME} ${VERSION} ${BUILD} \
163 ${RPMARCH} ${srcdir}
164
DRCf26914b2010-02-15 11:36:46 +0000165srpm: dist-gzip
DRC6533b6e2010-02-15 14:57:18 +0000166 sh $(srcdir)/release/makesrpm ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRC52a19f22010-02-15 12:06:27 +0000167
168deb: all
169 sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
170 ${DEBARCH} ${srcdir}
DRC6533b6e2010-02-15 14:57:18 +0000171
DRC315123f2010-02-15 16:14:26 +0000172if X86_64
173
174udmg: all
175 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
176 ${srcdir} universal
177
178endif
179
DRC6533b6e2010-02-15 14:57:18 +0000180dmg: all
181 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRCb9b1ca32010-02-17 02:24:02 +0000182
183if X86_64
184
185sunpkg: all
186 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
187 ${DEBARCH} ${srcdir} $(CC) $(CXX) combined
188
DRC3dc1bc22010-05-10 22:18:10 +0000189nsi: all
190 makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc64 \
DRCef663e32010-05-10 23:39:22 +0000191 -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. -DWIN64 \
DRC3dc1bc22010-05-10 22:18:10 +0000192 -DPLATFORM="GCC 64-bit" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
193
DRCb9b1ca32010-02-17 02:24:02 +0000194else
195
196sunpkg: all
197 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
198 ${DEBARCH} ${srcdir} $(CC) $(CXX)
199
DRC0a1f68e2010-02-24 07:24:26 +0000200nsi: all
201 makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \
202 -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \
203 -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
DRC3dc1bc22010-05-10 22:18:10 +0000204
205endif
DRCae79fdb2010-06-09 20:16:04 +0000206
207cygwinpkg: all
208 sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}