1# Makefile for Independent JPEG Group's software 2 3# This makefile is suitable for Unix-like systems with ANSI-capable compilers. 4# If you have a non-ANSI compiler, makefile.unix is a better starting point. 5 6# Read installation instructions before saying "make" !! 7 8# The name of your C compiler: 9CC= cc 10 11# You may need to adjust these cc options: 12CFLAGS= -O 13# Generally, we recommend defining any configuration symbols in jconfig.h, 14# NOT via -D switches here. 15 16# Link-time cc options: 17LDFLAGS= 18 19# To link any special libraries, add the necessary -l commands here. 20LDLIBS= 21 22# Put here the object file name for the correct system-dependent memory 23# manager file. For Unix this is usually jmemnobs.o, but you may want 24# to use jmemansi.o or jmemname.o if you have limited swap space. 25SYSDEPMEM= jmemnobs.o 26 27# miscellaneous OS-dependent stuff 28# linker 29LN= $(CC) 30# file deletion command 31RM= rm -f 32# library (.a) file creation command 33AR= ar rc 34# second step in .a creation (use "touch" if not needed) 35AR2= ranlib 36 37# End of configurable options. 38 39 40# source files: JPEG library proper 41LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \ 42 jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \ 43 jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \ 44 jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \ 45 jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \ 46 jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \ 47 jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \ 48 jquant2.c jutils.c jmemmgr.c 49# memmgr back ends: compile only one of these into a working library 50SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c 51# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom 52APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ 53 rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ 54 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c 55SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) 56# files included by source files 57INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ 58 jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h 59# documentation, test, and support files 60DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ 61 wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \ 62 coderules.txt filelist.txt change.log 63MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \ 64 makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \ 65 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \ 66 makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \ 67 maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \ 68 makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.v10 \ 69 makeasln.v10 makejvcx.v10 makejfil.v10 makecvcx.v10 makecfil.v10 \ 70 makedvcx.v10 makedfil.v10 maketvcx.v10 maketfil.v10 makervcx.v10 \ 71 makerfil.v10 makewvcx.v10 makewfil.v10 makeproj.mac makcjpeg.st \ 72 makdjpeg.st makljpeg.st maktjpeg.st makefile.manx makefile.sas \ 73 makefile.mms makefile.vms makvms.opt 74CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ 75 jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ 76 jconfig.vms 77CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ 78 missing ar-lib 79OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map 80TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ 81 testimgp.jpg 82DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ 83 $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) 84# library object files common to compression and decompression 85COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) 86# compression library object files 87CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \ 88 jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ 89 jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \ 90 jfdctflt.o jfdctint.o 91# decompression library object files 92DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \ 93 jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \ 94 jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \ 95 jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o 96# These objectfiles are included in libjpeg.a 97LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) 98# object files for sample applications (excluding library files) 99COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ 100 cdjpeg.o 101DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ 102 cdjpeg.o 103TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o 104 105 106all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom 107 108libjpeg.a: $(LIBOBJECTS) 109 $(RM) libjpeg.a 110 $(AR) libjpeg.a $(LIBOBJECTS) 111 $(AR2) libjpeg.a 112 113cjpeg: $(COBJECTS) libjpeg.a 114 $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) 115 116djpeg: $(DOBJECTS) libjpeg.a 117 $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) 118 119jpegtran: $(TROBJECTS) libjpeg.a 120 $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) 121 122rdjpgcom: rdjpgcom.o 123 $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) 124 125wrjpgcom: wrjpgcom.o 126 $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) 127 128jconfig.h: jconfig.txt 129 echo You must prepare a system-dependent jconfig.h file. 130 echo Please read the installation directions in install.txt. 131 exit 1 132 133clean: 134 $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom 135 $(RM) core testout* 136 137test: cjpeg djpeg jpegtran 138 $(RM) testout* 139 ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg 140 ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg 141 ./cjpeg -dct int -outfile testout.jpg testimg.ppm 142 ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg 143 ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm 144 ./jpegtran -outfile testoutt.jpg testprog.jpg 145 cmp testimg.ppm testout.ppm 146 cmp testimg.bmp testout.bmp 147 cmp testimg.jpg testout.jpg 148 cmp testimg.ppm testoutp.ppm 149 cmp testimgp.jpg testoutp.jpg 150 cmp testorig.jpg testoutt.jpg 151 152 153jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 154jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 155jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 156jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 157jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 158jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 159jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 160jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 161jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 162jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 163jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 164jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 165jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 166jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 167jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 168jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 169jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 170jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 171jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 172jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 173jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 174jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 175jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 176jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 177jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 178jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 179jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 180jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 181jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 182jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 183jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 184jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 185jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 186jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 187jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h 188jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 189jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 190jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 191jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 192jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 193jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 194jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 195jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 196jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 197jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 198jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 199jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 200jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 201jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 202jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 203cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 204djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 205jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h 206rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h 207wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h 208cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 209rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 210rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 211transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h 212rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 213wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 214rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 215wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 216rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 217wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 218rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 219wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 220rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 221wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 222