1# Makefile for Independent JPEG Group's software 2 3# makefile.auto 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 = /usr/local 13exec_prefix = $(prefix) 14bindir = $(exec_prefix)/bin 15libdir = $(exec_prefix)/lib 16includedir = $(prefix)/include 17mandir = $(prefix)/man/man1 18binprefix = 19manprefix = 20manext = 1 21 22# The name of your C compiler: 23CC= @CC@ 24 25# You may need to adjust these cc options: 26CFLAGS= -O -I$(srcdir) 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= 34 35# To link any special libraries, add the necessary -l commands here. 36LDLIBS= 37 38# Put here the object file name for the correct system-dependent memory 39# manager file. For Unix this is usually jmemnobs.o, but you may want 40# to use jmemansi.o or jmemname.o if you have limited swap space. 41SYSDEPMEM= @MEMORYMGR@ 42 43# miscellaneous OS-dependent stuff 44SHELL= /bin/sh 45# linker 46LN= $(CC) 47# file deletion command 48RM= rm -f 49# file rename command 50MV= mv 51# library (.a) file creation command 52AR= ar rc 53# second step in .a creation (use "touch" if not needed) 54AR2= @RANLIB@ 55# installation program 56INSTALL= @INSTALL@ 57INSTALL_PROGRAM= @INSTALL_PROGRAM@ 58INSTALL_DATA= @INSTALL_DATA@ 59 60# End of configurable options. 61 62 63# source files: JPEG library proper 64LIBSOURCES= jcapi.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcmainct.c \ 65 jcmarker.c jcmaster.c jcomapi.c jcparam.c jcprepct.c jcsample.c \ 66 jdapi.c jdatasrc.c jdatadst.c jdcoefct.c jdcolor.c jddctmgr.c \ 67 jdhuff.c jdmainct.c jdmarker.c jdmaster.c jdpostct.c jdsample.c \ 68 jerror.c jutils.c jfdctfst.c jfdctflt.c jfdctint.c jidctfst.c \ 69 jidctflt.c jidctint.c jidctred.c jquant1.c jquant2.c jdmerge.c \ 70 jmemmgr.c jmemansi.c jmemname.c jmemnobs.c jmemdos.c 71# source files: cjpeg/djpeg applications, also rdjpgcom/wrjpgcom 72APPSOURCES= cjpeg.c djpeg.c rdcolmap.c rdppm.c wrppm.c rdgif.c wrgif.c \ 73 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c rdjpgcom.c \ 74 wrjpgcom.c 75SOURCES= $(LIBSOURCES) $(APPSOURCES) 76# files included by source files 77INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ 78 jpeglib.h jversion.h cdjpeg.h cderror.h 79# documentation, test, and support files 80DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 rdjpgcom.1 wrjpgcom.1 \ 81 example.c libjpeg.doc structure.doc coderules.doc filelist.doc \ 82 change.log 83MKFILES= configure makefile.auto makefile.ansi makefile.unix makefile.manx \ 84 makefile.sas makcjpeg.st makdjpeg.st makljpeg.st makefile.bcc \ 85 makefile.mc6 makefile.dj makefile.mms makefile.vms makvms.opt 86CONFIGFILES= jconfig.auto jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ 87 jconfig.mc6 jconfig.dj jconfig.vms 88OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm 89TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg 90DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ 91 $(OTHERFILES) $(TESTFILES) 92# library object files common to compression and decompression 93COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) 94# compression library object files 95CLIBOBJECTS= jcapi.o jcparam.o jdatadst.o jcmaster.o jcmarker.o jcmainct.o \ 96 jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o \ 97 jfdctfst.o jfdctflt.o jfdctint.o 98# decompression library object files 99DLIBOBJECTS= jdapi.o jdatasrc.o jdmaster.o jdmarker.o jdmainct.o jdcoefct.o \ 100 jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ 101 jdhuff.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o 102# These objectfiles are included in libjpeg.a 103LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) 104# object files for cjpeg and djpeg applications (excluding library files) 105COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o 106DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o 107 108 109all: @ANSI2KNR@ libjpeg.a cjpeg djpeg rdjpgcom wrjpgcom 110 111# This rule causes ansi2knr to be invoked. 112@ISANSICOM@.c.o: 113@ISANSICOM@ ./ansi2knr $(srcdir)/$*.c T$*.c 114@ISANSICOM@ $(CC) $(CFLAGS) -c T$*.c 115@ISANSICOM@ $(RM) T$*.c $*.o 116@ISANSICOM@ $(MV) T$*.o $*.o 117 118ansi2knr: ansi2knr.c 119 $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c 120 121libjpeg.a: @ANSI2KNR@ $(LIBOBJECTS) 122 $(RM) libjpeg.a 123 $(AR) libjpeg.a $(LIBOBJECTS) 124 $(AR2) libjpeg.a 125 126cjpeg: $(COBJECTS) libjpeg.a 127 $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) 128 129djpeg: $(DOBJECTS) libjpeg.a 130 $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) 131 132rdjpgcom: rdjpgcom.o 133 $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) 134 135wrjpgcom: wrjpgcom.o 136 $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) 137 138jconfig.h: jconfig.doc 139 echo You must prepare a system-dependent jconfig.h file. 140 echo Please read the installation directions in install.doc. 141 exit 1 142 143install: cjpeg djpeg rdjpgcom wrjpgcom 144 $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg 145 $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg 146 $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom 147 $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom 148 $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext) 149 $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext) 150 $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext) 151 $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext) 152 153install-lib: libjpeg.a jconfig.h 154 $(INSTALL_DATA) libjpeg.a $(libdir)/$(binprefix)libjpeg.a 155 $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h 156 $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h 157 $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h 158 $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h 159 160clean: 161 $(RM) *.o cjpeg djpeg libjpeg.a rdjpgcom wrjpgcom ansi2knr core testout.* 162 163distribute: 164 $(RM) jpegsrc.tar* 165 tar cvf jpegsrc.tar $(DISTFILES) 166 compress -v jpegsrc.tar 167 168test: cjpeg djpeg 169 $(RM) testout.ppm testout.gif testout.jpg 170 ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg 171 ./djpeg -dct int -gif -outfile testout.gif testorig.jpg 172 ./cjpeg -dct int -outfile testout.jpg testimg.ppm 173 cmp testimg.ppm testout.ppm 174 cmp testimg.gif testout.gif 175 cmp testimg.jpg testout.jpg 176 177check: test 178 179# GNU Make likes to know which target names are not really files to be made: 180.PHONY: all install install-lib clean distribute test check 181 182 183jcapi.o : jcapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 184jccoefct.o : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 185jccolor.o : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 186jcdctmgr.o : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 187jchuff.o : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 188jcmainct.o : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 189jcmarker.o : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 190jcmaster.o : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 191jcomapi.o : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 192jcparam.o : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 193jcprepct.o : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 194jcsample.o : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 195jdapi.o : jdapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 196jdatasrc.o : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 197jdatadst.o : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 198jdcoefct.o : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 199jdcolor.o : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 200jddctmgr.o : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 201jdhuff.o : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 202jdmainct.o : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 203jdmarker.o : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 204jdmaster.o : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 205jdpostct.o : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 206jdsample.o : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 207jerror.o : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h 208jutils.o : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 209jfdctfst.o : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 210jfdctflt.o : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 211jfdctint.o : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 212jidctfst.o : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 213jidctflt.o : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 214jidctint.o : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 215jidctred.o : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 216jquant1.o : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 217jquant2.o : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 218jdmerge.o : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 219jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 220jmemansi.o : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 221jmemname.o : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 222jmemnobs.o : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 223jmemdos.o : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 224cjpeg.o : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 225djpeg.o : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 226rdcolmap.o : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 227rdppm.o : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 228wrppm.o : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 229rdgif.o : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 230wrgif.o : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 231rdtarga.o : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 232wrtarga.o : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 233rdbmp.o : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 234wrbmp.o : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 235rdrle.o : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 236wrrle.o : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 237rdjpgcom.o : rdjpgcom.c jinclude.h jconfig.h 238wrjpgcom.o : wrjpgcom.c jinclude.h jconfig.h 239