1# Makefile for Independent JPEG Group's software 2 3# This makefile is for Microsoft C for MS-DOS, version 6.00A and up. 4# Use NMAKE, not Microsoft's brain-damaged MAKE. 5# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd. 6 7# Read installation instructions before saying "nmake" !! 8 9# You may need to adjust these compiler options: 10CFLAGS = -AM -Oecigt -Gs -W3 11# -AM medium memory model (or use -AS for small model, if you remove features) 12# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A) 13# -W3 warning level 3 14# You might also want to add -G2 if you have an 80286, etc. 15# Generally, we recommend defining any configuration symbols in jconfig.h, 16# NOT via -D switches here. 17 18# Put here the object file name for the correct system-dependent memory 19# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm. 20# If you change this, you'll need to modify the linker response file 21# name list, below, by hand! 22SYSDEPMEM= jmemdos.obj jmemdosa.obj 23 24# End of configurable options. 25 26 27# source files: JPEG library proper 28LIBSOURCES= jcapi.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcmainct.c \ 29 jcmarker.c jcmaster.c jcomapi.c jcparam.c jcprepct.c jcsample.c \ 30 jdapi.c jdatasrc.c jdatadst.c jdcoefct.c jdcolor.c jddctmgr.c \ 31 jdhuff.c jdmainct.c jdmarker.c jdmaster.c jdpostct.c jdsample.c \ 32 jerror.c jutils.c jfdctfst.c jfdctflt.c jfdctint.c jidctfst.c \ 33 jidctflt.c jidctint.c jidctred.c jquant1.c jquant2.c jdmerge.c \ 34 jmemmgr.c jmemansi.c jmemname.c jmemnobs.c jmemdos.c 35# source files: cjpeg/djpeg applications, also rdjpgcom/wrjpgcom 36APPSOURCES= cjpeg.c djpeg.c rdcolmap.c rdppm.c wrppm.c rdgif.c wrgif.c \ 37 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c rdjpgcom.c \ 38 wrjpgcom.c 39SOURCES= $(LIBSOURCES) $(APPSOURCES) 40# files included by source files 41INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ 42 jpeglib.h jversion.h cdjpeg.h cderror.h 43# documentation, test, and support files 44DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 rdjpgcom.1 wrjpgcom.1 \ 45 example.c libjpeg.doc structure.doc coderules.doc filelist.doc \ 46 change.log 47MKFILES= configure makefile.auto makefile.ansi makefile.unix makefile.manx \ 48 makefile.sas makcjpeg.st makdjpeg.st makljpeg.st makefile.bcc \ 49 makefile.mc6 makefile.dj makefile.mms makefile.vms makvms.opt 50CONFIGFILES= jconfig.auto jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ 51 jconfig.mc6 jconfig.dj jconfig.vms 52OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm 53TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg 54DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ 55 $(OTHERFILES) $(TESTFILES) 56# library object files common to compression and decompression 57COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) 58# compression library object files 59CLIBOBJECTS= jcapi.obj jcparam.obj jdatadst.obj jcmaster.obj jcmarker.obj \ 60 jcmainct.obj jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj \ 61 jchuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj 62# decompression library object files 63DLIBOBJECTS= jdapi.obj jdatasrc.obj jdmaster.obj jdmarker.obj jdmainct.obj \ 64 jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \ 65 jidctint.obj jidctred.obj jdhuff.obj jdsample.obj jdcolor.obj \ 66 jquant1.obj jquant2.obj jdmerge.obj 67# These objectfiles are included in libjpeg.lib 68LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) 69# object files for cjpeg and djpeg applications (excluding library files) 70COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj 71DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ 72 rdcolmap.obj 73 74# need linker response file because file list > 128 chars 75RFILE = libjpeg.ans 76 77 78all: libjpeg.lib cjpeg.exe djpeg.exe rdjpgcom.exe wrjpgcom.exe 79 80libjpeg.lib: $(LIBOBJECTS) $(RFILE) 81 del libjpeg.lib 82 lib @$(RFILE) ; 83 84# linker response file for building libjpeg.lib 85$(RFILE) : Makefile 86 del $(RFILE) 87 echo libjpeg.lib >$(RFILE) 88# silly want-to-create-it prompt: 89 echo y >>$(RFILE) 90 echo +jcapi.obj +jcparam.obj +jdatadst.obj +jcmaster.obj & >>$(RFILE) 91 echo +jcmarker.obj +jcmainct.obj +jcprepct.obj & >>$(RFILE) 92 echo +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & >>$(RFILE) 93 echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE) 94 echo +jfdctint.obj +jdapi.obj +jdatasrc.obj +jdmaster.obj & >>$(RFILE) 95 echo +jdmarker.obj +jdmainct.obj +jdcoefct.obj & >>$(RFILE) 96 echo +jdpostct.obj +jddctmgr.obj +jidctfst.obj & >>$(RFILE) 97 echo +jidctflt.obj +jidctint.obj +jidctred.obj +jdhuff.obj & >>$(RFILE) 98 echo +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj & >>$(RFILE) 99 echo +jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj & >>$(RFILE) 100 echo +jmemmgr.obj +jmemdos.obj +jmemdosa.obj >>$(RFILE) 101 102cjpeg.exe: $(COBJECTS) libjpeg.lib 103 link /STACK:4096 /EXEPACK $(COBJECTS), cjpeg.exe, , libjpeg.lib, ; 104 105djpeg.exe: $(DOBJECTS) libjpeg.lib 106 link /STACK:4096 /EXEPACK $(DOBJECTS), djpeg.exe, , libjpeg.lib, ; 107 108rdjpgcom.exe: rdjpgcom.c 109 $(CC) -AS -O -W3 rdjpgcom.c 110 111# wrjpgcom needs large model so it can malloc a 64K chunk 112wrjpgcom.exe: wrjpgcom.c 113 $(CC) -AL -O -W3 wrjpgcom.c 114 115jconfig.h: jconfig.doc 116 echo You must prepare a system-dependent jconfig.h file. 117 echo Please read the installation directions in install.doc. 118 exit 1 119 120clean: 121 del *.obj 122 del libjpeg.lib 123 del cjpeg.exe 124 del djpeg.exe 125 del rdjpgcom.exe 126 del wrjpgcom.exe 127 del testout.* 128 129test: cjpeg.exe djpeg.exe 130 del testout.* 131 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg 132 djpeg -dct int -gif -outfile testout.gif testorig.jpg 133 cjpeg -dct int -outfile testout.jpg testimg.ppm 134 fc /b testimg.ppm testout.ppm 135 fc /b testimg.gif testout.gif 136 fc /b testimg.jpg testout.jpg 137 138 139jcapi.obj : jcapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 140jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 141jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 142jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 143jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 144jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 145jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 146jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 147jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 148jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 149jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 150jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 151jdapi.obj : jdapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 152jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 153jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h 154jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 155jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 156jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 157jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 158jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 159jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 160jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 161jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 162jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 163jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h 164jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 165jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 166jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 167jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 168jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 169jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 170jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 171jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h 172jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 173jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 174jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h 175jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 176jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 177jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 178jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 179jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h 180cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 181djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h 182rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 183rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 184wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 185rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 186wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 187rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 188wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 189rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 190wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 191rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 192wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h 193rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h 194wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h 195jmemdosa.obj : jmemdosa.asm 196 masm /mx $*; 197