blob: 6aff054646a3aaa93d94c11f0193d58461643a54 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001# 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# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486:
19# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \
20# /OV4 /W3
21# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler
22# crash.
23
24# Ingar Steinsland suggests the following switches when building
25# a 16-bit Windows DLL:
26# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd
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# (But not for Windows; see install.doc if you use this makefile for Windows.)
31SYSDEPMEM= jmemdos.obj jmemdosa.obj
32# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
33SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
34
35# End of configurable options.
36
37
38# source files: JPEG library proper
39LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
40 jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
41 jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
42 jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
43 jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
44 jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
45 jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
46 jquant2.c jutils.c jmemmgr.c
47# memmgr back ends: compile only one of these into a working library
48SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
49# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
50APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
51 rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
52 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
53SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
54# files included by source files
55INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
56 jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
57# documentation, test, and support files
58DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
59 wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
60 coderules.doc filelist.doc change.log
61MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
62 makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
63 makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
64 maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
65 makvms.opt
66CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
67 jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
68 jconfig.vms
69CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
70OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
71TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
72 testimgp.jpg
73DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
74 $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
75# library object files common to compression and decompression
76COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
77# compression library object files
78CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
79 jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
80 jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
81 jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
82# decompression library object files
83DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
84 jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
85 jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
86 jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
87 jquant1.obj jquant2.obj jdmerge.obj
88# These objectfiles are included in libjpeg.lib
89LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
90# object files for sample applications (excluding library files)
91COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
92 rdswitch.obj cdjpeg.obj
93DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
94 rdcolmap.obj cdjpeg.obj
95TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
96
97# need linker response file because file list > 128 chars
98RFILE = libjpeg.ans
99
100
101all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
102
103libjpeg.lib: $(LIBOBJECTS) $(RFILE)
104 del libjpeg.lib
105 lib @$(RFILE)
106
107# linker response file for building libjpeg.lib
108$(RFILE) : makefile
109 del $(RFILE)
110 echo libjpeg.lib >$(RFILE)
111# silly want-to-create-it prompt:
112 echo y >>$(RFILE)
113 echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE)
114 echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE)
115 echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE)
116 echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE)
117 echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE)
118 echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE)
119 echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE)
120 echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE)
121 echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE)
122 echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE)
123 echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE)
124 echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE)
125 echo +jerror.obj +jmemmgr.obj & >>$(RFILE)
126 echo $(SYSDEPMEMLIB) ; >>$(RFILE)
127
128cjpeg.exe: $(COBJECTS) libjpeg.lib
129 echo $(COBJECTS) >cjpeg.lst
130 link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ;
131 del cjpeg.lst
132
133djpeg.exe: $(DOBJECTS) libjpeg.lib
134 echo $(DOBJECTS) >djpeg.lst
135 link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ;
136 del djpeg.lst
137
138jpegtran.exe: $(TROBJECTS) libjpeg.lib
139 link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ;
140
141rdjpgcom.exe: rdjpgcom.c
142 $(CC) -AS -O -W3 rdjpgcom.c
143
144# wrjpgcom needs large model so it can malloc a 64K chunk
145wrjpgcom.exe: wrjpgcom.c
146 $(CC) -AL -O -W3 wrjpgcom.c
147
148jconfig.h: jconfig.doc
149 echo You must prepare a system-dependent jconfig.h file.
150 echo Please read the installation directions in install.doc.
151 exit 1
152
153clean:
154 del *.obj
155 del libjpeg.lib
156 del cjpeg.exe
157 del djpeg.exe
158 del jpegtran.exe
159 del rdjpgcom.exe
160 del wrjpgcom.exe
161 del testout*.*
162
163test: cjpeg.exe djpeg.exe jpegtran.exe
164 del testout*.*
165 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
166 djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
167 cjpeg -dct int -outfile testout.jpg testimg.ppm
168 djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
169 cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
170 jpegtran -outfile testoutt.jpg testprog.jpg
171 fc /b testimg.ppm testout.ppm
172 fc /b testimg.bmp testout.bmp
173 fc /b testimg.jpg testout.jpg
174 fc /b testimg.ppm testoutp.ppm
175 fc /b testimgp.jpg testoutp.jpg
176 fc /b testorig.jpg testoutt.jpg
177
178
179jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
180jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
181jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
182jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
183jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
184jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
185jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
186jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
187jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
188jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
189jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
190jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
191jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
192jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
193jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
194jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
195jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
196jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
197jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
198jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
199jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
200jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
201jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
202jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
203jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
204jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
205jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
206jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
207jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
208jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
209jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
210jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
211jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
212jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
213jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
214jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
215jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
216jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
217jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
218jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
219jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
220jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
221jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
222jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
223jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
224jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
225jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
226jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
227jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
228jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
229cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
230djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
231jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
232rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
233wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
234cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
235rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
236rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
237transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
238rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
239wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
240rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
241wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
242rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
243wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
244rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
245wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
246rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
247wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
248jmemdosa.obj : jmemdosa.asm
249 masm /mx $*;