blob: 407ed58dc2787090c4d27d9da44fc8fa0f099929 [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
DRC60fa0602010-02-12 06:01:49 +000042noinst_PROGRAMS = jpgtest jpegut cjpeg djpeg jpegtran rdjpgcom wrjpgcom
DRC2e7b76b2009-04-03 12:04:24 +000043
DRC1bf1a142010-02-11 06:39:32 +000044jpgtest_SOURCES = $(TSTHDRS) jpgtest.cxx bmp.h bmp.c
DRC2e7b76b2009-04-03 12:04:24 +000045
DRC971d8512010-02-13 22:55:05 +000046jpgtest_LDADD = libturbojpeg.la
DRC2e7b76b2009-04-03 12:04:24 +000047
DRC1bf1a142010-02-11 06:39:32 +000048jpegut_SOURCES = $(TSTHDRS) jpegut.c bmp.h bmp.c
DRC2e7b76b2009-04-03 12:04:24 +000049
DRC971d8512010-02-13 22:55:05 +000050jpegut_LDADD = libturbojpeg.la
DRC73de9822009-06-25 20:41:17 +000051
52cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
53 rdppm.c rdswitch.c rdtarga.c
54
DRC971d8512010-02-13 22:55:05 +000055cjpeg_LDADD = libjpeg.la
DRC73de9822009-06-25 20:41:17 +000056
57cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
58 -DTARGA_SUPPORTED
59
60djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
61 wrbmp.c wrgif.c wrppm.c wrtarga.c
62
DRC971d8512010-02-13 22:55:05 +000063djpeg_LDADD = libjpeg.la
DRC73de9822009-06-25 20:41:17 +000064
65djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
66 -DTARGA_SUPPORTED
DRC60fa0602010-02-12 06:01:49 +000067
DRC0a945a12010-02-15 11:04:51 +000068jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
DRC60fa0602010-02-12 06:01:49 +000069
DRC971d8512010-02-13 22:55:05 +000070jpegtran_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +000071
DRC0a945a12010-02-15 11:04:51 +000072rdjpgcom_SOURCES = rdjpgcom.c
DRC60fa0602010-02-12 06:01:49 +000073
DRC971d8512010-02-13 22:55:05 +000074rdjpgcom_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +000075
76wrjpgcom_SOURCES = wrjpgcom.c
77
DRC971d8512010-02-13 22:55:05 +000078wrjpgcom_LDADD = libjpeg.la
DRC60fa0602010-02-12 06:01:49 +000079
DRC0a945a12010-02-15 11:04:51 +000080
81DISTMANS= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
82
83DOCS= README install.doc usage.doc wizard.doc example.c libjpeg.doc \
84 structure.doc coderules.doc filelist.doc jconfig.doc change.log \
DRC68fef832010-02-16 05:29:10 +000085 README-turbo.txt rdrle.c wrrle.c LICENSE.txt LGPL.txt BUILDING.txt
DRC0a945a12010-02-15 11:04:51 +000086
DRC968c8bb2010-02-22 22:50:13 +000087TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \
88 testimgfst.jpg testimgint.jpg testimgp.jpg testimgfst.ppm testimgint.ppm
DRC0a945a12010-02-15 11:04:51 +000089
90EXTRA_DIST = win release $(DOCS) $(DISTMANS) $(TESTFILES)
91
92dist-hook:
93 rm -rf `find $(distdir) -name .svn`
94
95
DRC4924e492010-02-19 07:00:30 +000096test: testclean cjpeg djpeg jpegtran jpegut
DRC971d8512010-02-13 22:55:05 +000097 ./jpegut
DRC0fd8be52010-02-19 05:12:39 +000098 ./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
DRC971d8512010-02-13 22:55:05 +0000110 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
DRC6f525922010-02-15 11:10:08 +0000111 cmp $(srcdir)/testimg.bmp testout.bmp
DRC0fd8be52010-02-19 05:12:39 +0000112 ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
DRC6f525922010-02-15 11:10:08 +0000113 cmp $(srcdir)/testimgp.jpg testoutp.jpg
DRC0fd8be52010-02-19 05:12:39 +0000114 ./jpegtran -outfile testoutt.jpg testoutp.jpg
115 cmp $(srcdir)/testimgint.jpg testoutt.jpg
DRC34d59e72010-02-12 06:27:34 +0000116
117testclean:
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
DRC079b4342010-02-15 11:32:23 +0000131
132rpm: all
133 sh $(srcdir)/release/makerpm ${PACKAGE_NAME} ${VERSION} ${BUILD} \
134 ${RPMARCH} ${srcdir}
135
DRCf26914b2010-02-15 11:36:46 +0000136srpm: dist-gzip
DRC6533b6e2010-02-15 14:57:18 +0000137 sh $(srcdir)/release/makesrpm ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRC52a19f22010-02-15 12:06:27 +0000138
139deb: all
140 sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
141 ${DEBARCH} ${srcdir}
DRC6533b6e2010-02-15 14:57:18 +0000142
DRC315123f2010-02-15 16:14:26 +0000143if X86_64
144
145udmg: all
146 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
147 ${srcdir} universal
148
149endif
150
DRC6533b6e2010-02-15 14:57:18 +0000151dmg: all
152 sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
DRCb9b1ca32010-02-17 02:24:02 +0000153
154if X86_64
155
156sunpkg: all
157 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
158 ${DEBARCH} ${srcdir} $(CC) $(CXX) combined
159
160else
161
162sunpkg: all
163 sh $(srcdir)/release/makesunpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
164 ${DEBARCH} ${srcdir} $(CC) $(CXX)
165
166endif
DRC0a1f68e2010-02-24 07:24:26 +0000167
168nsi: 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