1# Makefile for Independent JPEG Group's software 2 3# This makefile is suitable for Borland C (Turbo C) on MS-DOS. 4# It is set up for Borland C++, revision 3.0 or later. 5# For older versions (pre-3.0), replace "-O2" with "-O -G -Z" in CFLAGS. 6# If you have an even older version of Turbo C, you may be able to make it 7# work by saying "CC= tcc" below. (Very early versions of Turbo C++, 8# like 1.01, are so buggy that you may as well forget it.) 9# Thanks to Tom Wright and Ge' Weijers for this file. 10 11# Read installation instructions before saying "make" !! 12 13# The name of your C compiler: 14CC= bcc 15 16# You may need to adjust these cc options: 17CFLAGS= -mm -w-par -O2 18# -mm selects medium memory model (near data, far code pointers) 19# -w-par suppresses warnings about unused function parameters 20# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z) 21# Generally, we recommend defining any configuration symbols in jconfig.h, 22# NOT via -D switches here. 23 24# Link-time cc options: 25LDFLAGS= -mm 26# memory model option here must match CFLAGS! 27 28# Put here the object file name for the correct system-dependent memory 29# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm. 30# If you change this, you'll need to modify the linker response file 31# name list, below, by hand! 32SYSDEPMEM= jmemdos.obj jmemdosa.obj 33 34# End of configurable options. 35 36 37# source files: JPEG library proper 38LIBSOURCES= jcapi.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcmainct.c \ 39 jcmarker.c jcmaster.c jcomapi.c jcparam.c jcprepct.c jcsample.c \ 40 jdapi.c jdatasrc.c jdatadst.c jdcoefct.c jdcolor.c jddctmgr.c \ 41 jdhuff.c jdmainct.c jdmarker.c jdmaster.c jdpostct.c jdsample.c \ 42 jerror.c jutils.c jfdctfst.c jfdctflt.c jfdctint.c jidctfst.c \ 43 jidctflt.c jidctint.c jidctred.c jquant1.c jquant2.c jdmerge.c \ 44 jmemmgr.c jmemansi.c jmemname.c jmemnobs.c jmemdos.c 45# source files: cjpeg/djpeg applications, also rdjpgcom/wrjpgcom 46APPSOURCES= cjpeg.c djpeg.c rdcolmap.c rdppm.c wrppm.c rdgif.c wrgif.c \ 47 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c rdjpgcom.c \ 48 wrjpgcom.c 49SOURCES= $(LIBSOURCES) $(APPSOURCES) 50# files included by source files 51INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ 52 jpeglib.h jversion.h cdjpeg.h cderror.h 53# documentation, test, and support files 54DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 rdjpgcom.1 wrjpgcom.1 \ 55 example.c libjpeg.doc structure.doc coderules.doc filelist.doc \ 56 change.log 57MKFILES= configure makefile.auto makefile.ansi makefile.unix makefile.manx \ 58 makefile.sas makcjpeg.st makdjpeg.st makljpeg.st makefile.bcc \ 59 makefile.mc6 makefile.dj makefile.mms makefile.vms makvms.opt 60CONFIGFILES= jconfig.auto jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ 61 jconfig.mc6 jconfig.dj jconfig.vms 62OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm 63TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg 64DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ 65 $(OTHERFILES) $(TESTFILES) 66# library object files common to compression and decompression 67COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) 68# compression library object files 69CLIBOBJECTS= jcapi.obj jcparam.obj jdatadst.obj jcmaster.obj jcmarker.obj \ 70 jcmainct.obj jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj \ 71 jchuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj 72# decompression library object files 73DLIBOBJECTS= jdapi.obj jdatasrc.obj jdmaster.obj jdmarker.obj jdmainct.obj \ 74 jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ 75 jidctint.obj jidctred.obj jdhuff.obj jdsample.obj jdcolor.obj \ 76 jquant1.obj jquant2.obj jdmerge.obj 77# These objectfiles are included in libjpeg.lib 78LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) 79# object files for cjpeg and djpeg applications (excluding library files) 80COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj 81DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ 82 rdcolmap.obj 83 84# need linker response file because file list > 128 chars 85RFILE= libjpeg.ans 86 87 88all: libjpeg.lib cjpeg.exe djpeg.exe rdjpgcom.exe wrjpgcom.exe 89 90libjpeg.lib: $(LIBOBJECTS) $(RFILE) 91 del libjpeg.lib 92 tlib @$(RFILE) 93 94# linker response file for building libjpeg.lib 95$(RFILE) : Makefile 96 del $(RFILE) 97 echo libjpeg.lib & >$(RFILE) 98 echo +jcapi.obj +jcparam.obj +jdatadst.obj +jcmaster.obj & >>$(RFILE) 99 echo +jcmarker.obj +jcmainct.obj +jcprepct.obj & >>$(RFILE) 100 echo +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & >>$(RFILE) 101 echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE) 102 echo +jfdctint.obj +jdapi.obj +jdatasrc.obj +jdmaster.obj & >>$(RFILE) 103 echo +jdmarker.obj +jdmainct.obj +jdcoefct.obj & >>$(RFILE) 104 echo +jdpostct.obj +jddctmgr.obj +jidctfst.obj & >>$(RFILE) 105 echo +jidctflt.obj +jidctint.obj +jidctred.obj +jdhuff.obj & >>$(RFILE) 106 echo +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj & >>$(RFILE) 107 echo +jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj & >>$(RFILE) 108 echo +jmemmgr.obj +jmemdos.obj +jmemdosa.obj >>$(RFILE) 109 110cjpeg.exe: $(COBJECTS) libjpeg.lib 111 $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib 112 113djpeg.exe: $(DOBJECTS) libjpeg.lib 114 $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib 115 116rdjpgcom.exe: rdjpgcom.c 117 $(CC) -ms -O rdjpgcom.c 118 119# wrjpgcom needs large model so it can malloc a 64K chunk 120wrjpgcom.exe: wrjpgcom.c 121 $(CC) -ml -O wrjpgcom.c 122 123.c.obj: 124 $(CC) $(CFLAGS) -c $< 125 126jconfig.h: jconfig.doc 127 echo You must prepare a system-dependent jconfig.h file. 128 echo Please read the installation directions in install.doc. 129 exit 1 130 131clean: 132 del *.obj 133 del libjpeg.lib 134 del cjpeg.exe 135 del djpeg.exe 136 del rdjpgcom.exe 137 del wrjpgcom.exe 138 del testout.* 139 140test: cjpeg.exe djpeg.exe 141 del testout.* 142 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg 143 djpeg -dct int -gif -outfile testout.gif testorig.jpg 144 cjpeg -dct int -outfile testout.jpg testimg.ppm 145 fc /b testimg.ppm testout.ppm 146 fc /b testimg.gif testout.gif 147 fc /b testimg.jpg testout.jpg 148 149 150jcapi.obj : jcapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 151jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 152jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 153jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 154jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 155jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 156jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 157jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 158jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 159jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 160jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 161jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 162jdapi.obj : jdapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 163jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 164jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 165jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 166jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 167jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 168jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 169jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 170jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 171jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 172jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 173jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 174jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h 175jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 176jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 177jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 178jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 179jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 180jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 181jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 182jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 183jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 184jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 185jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 186jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 187jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 188jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 189jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 190jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 191cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 192djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 193rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 194rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 195wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 196rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 197wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 198rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 199wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 200rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 201wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 202rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 203wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 204rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h 205wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h 206jmemdosa.obj : jmemdosa.asm 207 tasm /mx jmemdosa.asm 208