source: trunk/third/jpeg/makefile.cfg @ 15233

Revision 15233, 14.8 KB checked in by ghudson, 24 years ago (diff)
Add DESTDIR support. Don't build or install programs. Make directories before installing into them.
Line 
1# Makefile for Independent JPEG Group's software
2
3# makefile.cfg is edited by configure to produce a custom Makefile.
4
5# Read installation instructions before saying "make" !!
6
7# For compiling with source and object files in different directories.
8srcdir = @srcdir@
9VPATH = @srcdir@
10
11# Where to install the programs and man pages.
12prefix = @prefix@
13exec_prefix = @exec_prefix@
14bindir = $(exec_prefix)/bin
15libdir = $(exec_prefix)/lib
16includedir = $(prefix)/include
17binprefix =
18manprefix =
19manext = 1
20mandir = $(prefix)/man/man$(manext)
21
22# The name of your C compiler:
23CC= @CC@
24
25# You may need to adjust these cc options:
26CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@
27# Generally, we recommend defining any configuration symbols in jconfig.h,
28# NOT via -D switches here.
29# However, any special defines for ansi2knr.c may be included here:
30ANSI2KNRFLAGS= @ANSI2KNRFLAGS@
31
32# Link-time cc options:
33LDFLAGS= @LDFLAGS@
34
35# To link any special libraries, add the necessary -l commands here.
36LDLIBS= @LIBS@
37
38# If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty.
39LIBTOOL = @LIBTOOL@
40# $(O) expands to "lo" if using libtool, plain "o" if not.
41# Similarly, $(A) expands to "la" or "a".
42O = @O@
43A = @A@
44
45# Library version ID; libtool uses this for the shared library version number.
46# Note: we suggest this match the macro of the same name in jpeglib.h.
47JPEG_LIB_VERSION = @JPEG_LIB_VERSION@
48
49# Put here the object file name for the correct system-dependent memory
50# manager file.  For Unix this is usually jmemnobs.o, but you may want
51# to use jmemansi.o or jmemname.o if you have limited swap space.
52SYSDEPMEM= @MEMORYMGR@
53
54# miscellaneous OS-dependent stuff
55SHELL= /bin/sh
56# linker
57LN= @LN@
58# file deletion command
59RM= rm -f
60# directory creation command
61MKDIR= mkdir
62# library (.a) file creation command
63AR= ar rc
64# second step in .a creation (use "touch" if not needed)
65AR2= @RANLIB@
66# installation program
67INSTALL= @INSTALL@
68INSTALL_PROGRAM= @INSTALL_PROGRAM@
69INSTALL_LIB= @INSTALL_LIB@
70INSTALL_DATA= @INSTALL_DATA@
71
72# End of configurable options.
73
74
75# source files: JPEG library proper
76LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
77        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
78        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
79        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
80        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
81        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
82        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
83        jquant2.c jutils.c jmemmgr.c
84# memmgr back ends: compile only one of these into a working library
85SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
86# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
87APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
88        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
89        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
90SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
91# files included by source files
92INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
93        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
94# documentation, test, and support files
95DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
96        wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
97        coderules.doc filelist.doc change.log
98MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
99        makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
100        makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
101        maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
102        makvms.opt
103CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
104        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
105        jconfig.vms
106CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
107OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
108TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
109        testimgp.jpg
110DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
111        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
112# library object files common to compression and decompression
113COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM)
114# compression library object files
115CLIBOBJECTS= jcapimin.$(O) jcapistd.$(O) jctrans.$(O) jcparam.$(O) \
116        jdatadst.$(O) jcinit.$(O) jcmaster.$(O) jcmarker.$(O) jcmainct.$(O) \
117        jcprepct.$(O) jccoefct.$(O) jccolor.$(O) jcsample.$(O) jchuff.$(O) \
118        jcphuff.$(O) jcdctmgr.$(O) jfdctfst.$(O) jfdctflt.$(O) \
119        jfdctint.$(O)
120# decompression library object files
121DLIBOBJECTS= jdapimin.$(O) jdapistd.$(O) jdtrans.$(O) jdatasrc.$(O) \
122        jdmaster.$(O) jdinput.$(O) jdmarker.$(O) jdhuff.$(O) jdphuff.$(O) \
123        jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) \
124        jidctfst.$(O) jidctflt.$(O) jidctint.$(O) jidctred.$(O) \
125        jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O)
126# These objectfiles are included in libjpeg.a
127LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
128# object files for sample applications (excluding library files)
129COBJECTS= cjpeg.$(O) rdppm.$(O) rdgif.$(O) rdtarga.$(O) rdrle.$(O) \
130        rdbmp.$(O) rdswitch.$(O) cdjpeg.$(O)
131DOBJECTS= djpeg.$(O) wrppm.$(O) wrgif.$(O) wrtarga.$(O) wrrle.$(O) \
132        wrbmp.$(O) rdcolmap.$(O) cdjpeg.$(O)
133TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O)
134
135
136all: @A2K_DEPS@ libjpeg.$(A)
137
138# Special compilation rules to support ansi2knr and libtool.
139.SUFFIXES: .lo .la
140
141# How to compile with libtool.
142@COM_LT@.c.lo:
143@COM_LT@        $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
144
145# How to use ansi2knr, when not using libtool.
146@COM_A2K@.c.o:
147@COM_A2K@       ./ansi2knr $(srcdir)/$*.c knr/$*.c
148@COM_A2K@       $(CC) $(CFLAGS) -c knr/$*.c
149@COM_A2K@       $(RM) knr/$*.c
150
151# How to use ansi2knr AND libtool.
152@COM_A2K@.c.lo:
153@COM_A2K@       ./ansi2knr $(srcdir)/$*.c knr/$*.c
154@COM_A2K@       $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
155@COM_A2K@       $(RM) knr/$*.c
156
157ansi2knr: ansi2knr.c
158        $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr $(srcdir)/ansi2knr.c
159        $(MKDIR) knr
160
161# the library:
162
163# without libtool:
164libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
165        $(RM) libjpeg.a
166        $(AR) libjpeg.a  $(LIBOBJECTS)
167        $(AR2) libjpeg.a
168
169# with libtool:
170libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
171        $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
172                -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
173
174# sample programs:
175
176cjpeg: $(COBJECTS) libjpeg.$(A)
177        $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.$(A) $(LDLIBS)
178
179djpeg: $(DOBJECTS) libjpeg.$(A)
180        $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.$(A) $(LDLIBS)
181
182jpegtran: $(TROBJECTS) libjpeg.$(A)
183        $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.$(A) $(LDLIBS)
184
185rdjpgcom: rdjpgcom.$(O)
186        $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.$(O) $(LDLIBS)
187
188wrjpgcom: wrjpgcom.$(O)
189        $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.$(O) $(LDLIBS)
190
191# Installation rules:
192
193install: @FORCE_INSTALL_LIB@
194
195install-lib: libjpeg.$(A) install-headers
196        mkdir -p $(DESTDIR)$(libdir)
197        $(INSTALL_LIB) libjpeg.$(A) $(DESTDIR)$(libdir)/$(binprefix)libjpeg.$(A)
198
199install-headers: jconfig.h
200        mkdir -p $(DESTDIR)$(includedir)
201        $(INSTALL_DATA) jconfig.h $(DESTDIR)$(includedir)/jconfig.h
202        $(INSTALL_DATA) $(srcdir)/jpeglib.h $(DESTDIR)$(includedir)/jpeglib.h
203        $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(DESTDIR)$(includedir)/jmorecfg.h
204        $(INSTALL_DATA) $(srcdir)/jerror.h $(DESTDIR)$(includedir)/jerror.h
205
206clean:
207        $(RM) *.o *.lo libjpeg.a libjpeg.la
208        $(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
209        $(RM) ansi2knr core testout* config.log config.status
210        $(RM) -r knr .libs _libs
211
212distclean: clean
213        $(RM) Makefile jconfig.h libtool config.cache
214
215test: cjpeg djpeg jpegtran
216        $(RM) testout*
217        ./djpeg -dct int -ppm -outfile testout.ppm  $(srcdir)/testorig.jpg
218        ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp  $(srcdir)/testorig.jpg
219        ./cjpeg -dct int -outfile testout.jpg  $(srcdir)/testimg.ppm
220        ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg
221        ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm
222        ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg
223        cmp $(srcdir)/testimg.ppm testout.ppm
224        cmp $(srcdir)/testimg.bmp testout.bmp
225        cmp $(srcdir)/testimg.jpg testout.jpg
226        cmp $(srcdir)/testimg.ppm testoutp.ppm
227        cmp $(srcdir)/testimgp.jpg testoutp.jpg
228        cmp $(srcdir)/testorig.jpg testoutt.jpg
229
230check: test
231
232# Mistake catcher:
233
234jconfig.h: jconfig.doc
235        echo You must prepare a system-dependent jconfig.h file.
236        echo Please read the installation directions in install.doc.
237        exit 1
238
239# GNU Make likes to know which target names are not really files to be made:
240.PHONY: all install install-lib install-headers clean distclean test check
241
242
243jcapimin.$(O): jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
244jcapistd.$(O): jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
245jccoefct.$(O): jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
246jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
247jcdctmgr.$(O): jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
248jchuff.$(O): jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
249jcinit.$(O): jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
250jcmainct.$(O): jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
251jcmarker.$(O): jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
252jcmaster.$(O): jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
253jcomapi.$(O): jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
254jcparam.$(O): jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
255jcphuff.$(O): jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
256jcprepct.$(O): jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
257jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
258jctrans.$(O): jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
259jdapimin.$(O): jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
260jdapistd.$(O): jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
261jdatadst.$(O): jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
262jdatasrc.$(O): jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
263jdcoefct.$(O): jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
264jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
265jddctmgr.$(O): jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
266jdhuff.$(O): jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
267jdinput.$(O): jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
268jdmainct.$(O): jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
269jdmarker.$(O): jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
270jdmaster.$(O): jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
271jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
272jdphuff.$(O): jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
273jdpostct.$(O): jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
274jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
275jdtrans.$(O): jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
276jerror.$(O): jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
277jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
278jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
279jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
280jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
281jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
282jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
283jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
284jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
285jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
286jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
287jmemmgr.$(O): jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
288jmemansi.$(O): jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
289jmemname.$(O): jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
290jmemnobs.$(O): jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
291jmemdos.$(O): jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
292jmemmac.$(O): jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
293cjpeg.$(O): cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
294djpeg.$(O): djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
295jpegtran.$(O): jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
296rdjpgcom.$(O): rdjpgcom.c jinclude.h jconfig.h
297wrjpgcom.$(O): wrjpgcom.c jinclude.h jconfig.h
298cdjpeg.$(O): cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
299rdcolmap.$(O): rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
300rdswitch.$(O): rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
301transupp.$(O): transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
302rdppm.$(O): rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
303wrppm.$(O): wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
304rdgif.$(O): rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
305wrgif.$(O): wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
306rdtarga.$(O): rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
307wrtarga.$(O): wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
308rdbmp.$(O): rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
309wrbmp.$(O): wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
310rdrle.$(O): rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
311wrrle.$(O): wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
Note: See TracBrowser for help on using the repository browser.