1991-10-06 20:00:00 -04:00
|
|
|
# Makefile for Independent JPEG Group's software
|
|
|
|
|
1992-12-09 19:00:00 -05:00
|
|
|
# This makefile is for Microsoft C for MS-DOS, version 6.00A and up.
|
|
|
|
# Use NMAKE, not Microsoft's brain-damaged MAKE.
|
1991-10-06 20:00:00 -04:00
|
|
|
# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd.
|
|
|
|
|
1992-12-09 19:00:00 -05:00
|
|
|
# Read SETUP instructions before saying "nmake" !!
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
# compiler flags. -D gives a #define to the sources:
|
1992-12-09 19:00:00 -05:00
|
|
|
# -AS small memory model (or use -AM for medium model)
|
|
|
|
# -Ox maximum safe optimisation
|
1991-10-06 20:00:00 -04:00
|
|
|
# -W3 warning level 3
|
1992-03-16 19:00:00 -05:00
|
|
|
# -Za ANSI conformance, defines __STDC__ but undefines far
|
1991-12-12 19:00:00 -05:00
|
|
|
# and near, so we DON'T use it.
|
1992-03-16 19:00:00 -05:00
|
|
|
# -DHAVE_STDC indicate we do have all the ANSI language features
|
1992-12-09 19:00:00 -05:00
|
|
|
# -DINCLUDES_ARE_ANSI and all the ANSI include files.
|
1991-10-06 20:00:00 -04:00
|
|
|
# -DMSDOS we are on an MSDOS machine
|
1992-12-09 19:00:00 -05:00
|
|
|
# -DUSE_FMEM we have _fmemcpy() and _fmemset()
|
1993-02-17 19:00:00 -05:00
|
|
|
# -DNEED_FHEAPMIN our heap management routines are broken
|
1992-12-09 19:00:00 -05:00
|
|
|
# -DSHORTxLCONST_32 enables compiler-specific multiply optimization
|
1991-10-06 20:00:00 -04:00
|
|
|
# -DMEM_STATS enable memory usage statistics (optional)
|
1991-12-12 19:00:00 -05:00
|
|
|
# You might also want to add -G2 if you have an 80286, etc.
|
1993-02-17 19:00:00 -05:00
|
|
|
# If you run up against DOS' 128-character limit on command line length,
|
|
|
|
# you can get rid of some of the -D switches by adding equivalent #define
|
|
|
|
# commands to the head of jinclude.h.
|
1991-10-06 20:00:00 -04:00
|
|
|
|
1993-02-17 19:00:00 -05:00
|
|
|
CFLAGS = -AS -Ox -W3 -DHAVE_STDC -DINCLUDES_ARE_ANSI -DMSDOS -DUSE_FMEM -DNEED_FHEAPMIN -DSHORTxLCONST_32
|
1992-12-09 19:00:00 -05:00
|
|
|
|
|
|
|
# need linker response file because file list > 128 chars
|
|
|
|
RFILE = libjpeg.ans
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# source files (independently compilable files)
|
|
|
|
SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
|
|
|
|
jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
|
|
|
|
jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
|
1992-03-16 19:00:00 -05:00
|
|
|
jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
|
|
|
|
jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
|
|
|
|
jwrppm.c jwrrle.c jwrtarga.c
|
1992-12-09 19:00:00 -05:00
|
|
|
# virtual source files (not present in distribution file, see SETUP)
|
1992-03-16 19:00:00 -05:00
|
|
|
VIRTSOURCES= jmemsys.c
|
1992-12-09 19:00:00 -05:00
|
|
|
# system-dependent implementations of virtual source files
|
1992-03-16 19:00:00 -05:00
|
|
|
SYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
|
|
|
|
jmemdosa.asm
|
1991-12-12 19:00:00 -05:00
|
|
|
# files included by source files
|
1992-12-09 19:00:00 -05:00
|
|
|
INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h
|
1991-12-12 19:00:00 -05:00
|
|
|
# documentation, test, and support files
|
|
|
|
DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
|
|
|
|
MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
|
1992-12-09 19:00:00 -05:00
|
|
|
makcjpeg.st makdjpeg.st makljpeg.st makefile.mc5 makefile.mc6 \
|
1993-02-17 19:00:00 -05:00
|
|
|
makefile.bcc makefile.icc makljpeg.icc makefile.mms makefile.vms \
|
|
|
|
makvms.opt
|
1992-03-16 19:00:00 -05:00
|
|
|
OTHERFILES= ansi2knr.c ckconfig.c example.c
|
|
|
|
TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
|
|
|
|
DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
|
|
|
|
$(OTHERFILES) $(TESTFILES)
|
1991-12-12 19:00:00 -05:00
|
|
|
# objectfiles common to cjpeg and djpeg
|
1992-03-16 19:00:00 -05:00
|
|
|
COMOBJECTS= jutils.obj jerror.obj jmemmgr.obj jmemsys.obj jmemdosa.obj
|
1991-10-06 20:00:00 -04:00
|
|
|
# compression objectfiles
|
1991-12-12 19:00:00 -05:00
|
|
|
CLIBOBJECTS= jcmaster.obj jcdeflts.obj jcarith.obj jccolor.obj jcexpand.obj \
|
|
|
|
jchuff.obj jcmcu.obj jcpipe.obj jcsample.obj jfwddct.obj \
|
|
|
|
jwrjfif.obj jrdgif.obj jrdppm.obj jrdrle.obj jrdtarga.obj
|
|
|
|
COBJECTS= jcmain.obj $(CLIBOBJECTS) $(COMOBJECTS)
|
1991-10-06 20:00:00 -04:00
|
|
|
# decompression objectfiles
|
1991-12-12 19:00:00 -05:00
|
|
|
DLIBOBJECTS= jdmaster.obj jddeflts.obj jbsmooth.obj jdarith.obj jdcolor.obj \
|
|
|
|
jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj \
|
|
|
|
jquant2.obj jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj \
|
|
|
|
jwrrle.obj jwrtarga.obj
|
|
|
|
DOBJECTS= jdmain.obj $(DLIBOBJECTS) $(COMOBJECTS)
|
|
|
|
# These objectfiles are included in libjpeg.lib
|
|
|
|
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
all: cjpeg.exe djpeg.exe
|
|
|
|
|
1992-12-09 19:00:00 -05:00
|
|
|
|
|
|
|
# libjpeg.lib is useful if you are including the JPEG software in a larger
|
|
|
|
# program; you'd include it in your link, rather than the individual modules.
|
|
|
|
libjpeg.lib: $(LIBOBJECTS) $(RFILE)
|
|
|
|
del libjpeg.lib
|
|
|
|
lib @$(RFILE) ;
|
|
|
|
|
|
|
|
# linker response file for same
|
|
|
|
$(RFILE) : Makefile
|
|
|
|
del $(RFILE)
|
|
|
|
echo libjpeg.lib >$(RFILE)
|
|
|
|
# silly want-to-create-it prompt:
|
|
|
|
echo y >>$(RFILE)
|
|
|
|
echo +jcmaster.obj +jcdeflts.obj +jcarith.obj +jccolor.obj & >>$(RFILE)
|
|
|
|
echo +jcexpand.obj +jchuff.obj +jcmcu.obj +jcpipe.obj & >>$(RFILE)
|
|
|
|
echo +jcsample.obj +jfwddct.obj +jwrjfif.obj +jrdgif.obj & >>$(RFILE)
|
|
|
|
echo +jrdppm.obj +jrdrle.obj +jrdtarga.obj +jdmaster.obj & >>$(RFILE)
|
|
|
|
echo +jddeflts.obj +jbsmooth.obj +jdarith.obj +jdcolor.obj & >>$(RFILE)
|
|
|
|
echo +jdhuff.obj +jdmcu.obj +jdpipe.obj +jdsample.obj & >>$(RFILE)
|
|
|
|
echo +jquant1.obj +jquant2.obj +jrevdct.obj +jrdjfif.obj & >>$(RFILE)
|
|
|
|
echo +jwrgif.obj +jwrppm.obj +jwrrle.obj +jwrtarga.obj & >>$(RFILE)
|
|
|
|
echo +jutils.obj +jerror.obj +jmemmgr.obj +jmemsys.obj & >>$(RFILE)
|
|
|
|
echo +jmemdosa.obj >>$(RFILE)
|
|
|
|
|
|
|
|
cjpeg.exe: jcmain.obj libjpeg.lib
|
|
|
|
link /STACK:4096 /EXEPACK jcmain.obj, cjpeg.exe, , libjpeg.lib, ;
|
|
|
|
|
|
|
|
djpeg.exe: jdmain.obj libjpeg.lib
|
|
|
|
link /STACK:4096 /EXEPACK jdmain.obj, djpeg.exe, , libjpeg.lib, ;
|
|
|
|
|
|
|
|
jmemsys.c:
|
|
|
|
echo You must select a system-dependent jmemsys.c file.
|
|
|
|
echo Please read the SETUP directions.
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
clean:
|
|
|
|
del *.obj
|
|
|
|
del libjpeg.lib
|
|
|
|
del cjpeg.exe
|
|
|
|
del djpeg.exe
|
|
|
|
del testout.*
|
|
|
|
|
|
|
|
test:
|
|
|
|
del testout.*
|
1993-02-17 19:00:00 -05:00
|
|
|
djpeg -outfile testout.ppm testorig.jpg
|
|
|
|
djpeg -gif -outfile testout.gif testorig.jpg
|
|
|
|
cjpeg -outfile testout.jpg testimg.ppm
|
|
|
|
fc /b testimg.ppm testout.ppm
|
|
|
|
fc /b testimg.gif testout.gif
|
|
|
|
fc /b testimg.jpg testout.jpg
|
1992-12-09 19:00:00 -05:00
|
|
|
|
1991-10-06 20:00:00 -04:00
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
jbsmooth.obj : jbsmooth.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcarith.obj : jcarith.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jccolor.obj : jccolor.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcdeflts.obj : jcdeflts.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcexpand.obj : jcexpand.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jchuff.obj : jchuff.c jinclude.h jconfig.h jpegdata.h
|
1992-12-09 19:00:00 -05:00
|
|
|
jcmain.obj : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcmcu.obj : jcmcu.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcpipe.obj : jcpipe.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcsample.obj : jcsample.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdarith.obj : jdarith.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jddeflts.obj : jddeflts.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpegdata.h
|
1992-12-09 19:00:00 -05:00
|
|
|
jdmain.obj : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdmcu.obj : jdmcu.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdpipe.obj : jdpipe.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdsample.obj : jdsample.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jerror.obj : jerror.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jquant1.obj : jquant1.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jquant2.obj : jquant2.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jfwddct.obj : jfwddct.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrevdct.obj : jrevdct.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jutils.obj : jutils.c jinclude.h jconfig.h jpegdata.h
|
1992-03-16 19:00:00 -05:00
|
|
|
jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jrdjfif.obj : jrdjfif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdgif.obj : jrdgif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdppm.obj : jrdppm.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdrle.obj : jrdrle.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdtarga.obj : jrdtarga.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrjfif.obj : jwrjfif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrgif.obj : jwrgif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrppm.obj : jwrppm.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrrle.obj : jwrrle.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrtarga.obj : jwrtarga.c jinclude.h jconfig.h jpegdata.h
|
1992-03-16 19:00:00 -05:00
|
|
|
jmemsys.obj : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h
|
|
|
|
jmemdosa.obj : jmemdosa.asm
|
1992-12-09 19:00:00 -05:00
|
|
|
masm /mx $*;
|