blob: d953e466f8c76d9f5dfa78b36d63c567604be088 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001# Makefile for Independent JPEG Group's software
2
3# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using
4# dos4g extender), OS/2, and Windows NT console mode.
5# Thanks to Janos Haide, jhaide@btrvtech.com.
6
7# Read installation instructions before saying "wmake" !!
8
9# Uncomment line for desired system
10SYSTEM=DOS
11#SYSTEM=OS2
12#SYSTEM=NT
13
14# The name of your C compiler:
15CC= wcl386
16
17# You may need to adjust these cc options:
18CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM)
19# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a.
20# Generally, we recommend defining any configuration symbols in jconfig.h,
21# NOT via -D switches here.
22
23# Link-time cc options:
24!ifeq SYSTEM DOS
25LDFLAGS= -zq -l=dos4g
26!else ifeq SYSTEM OS2
27LDFLAGS= -zq -l=os2v2
28!else ifeq SYSTEM NT
29LDFLAGS= -zq -l=nt
30!endif
31
32# Put here the object file name for the correct system-dependent memory
33# manager file. jmemnobs should work fine for dos4g or OS/2 environment.
34SYSDEPMEM= jmemnobs.obj
35
36# End of configurable options.
37
38
39# source files: JPEG library proper
40LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c &
41 jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c &
42 jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c &
43 jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c &
44 jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c &
45 jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c &
46 jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c &
47 jquant2.c jutils.c jmemmgr.c
48# memmgr back ends: compile only one of these into a working library
49SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
50# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
51APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
52 rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c &
53 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
54SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
55# files included by source files
56INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h &
57 jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
58# documentation, test, and support files
59DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
60 wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc &
61 coderules.doc filelist.doc change.log
62MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc &
63 makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds &
64 makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st &
65 maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms &
66 makvms.opt
67CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
68 jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
69 jconfig.vms
70CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
71OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
72TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
73 testimgp.jpg
74DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
75 $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
76# library object files common to compression and decompression
77COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
78# compression library object files
79CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
80 jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
81 jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
82 jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
83# decompression library object files
84DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
85 jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
86 jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
87 jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
88 jquant1.obj jquant2.obj jdmerge.obj
89# These objectfiles are included in libjpeg.lib
90LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
91# object files for sample applications (excluding library files)
92COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
93 rdswitch.obj cdjpeg.obj
94DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
95 rdcolmap.obj cdjpeg.obj
96TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
97
98
99all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
100
101libjpeg.lib: $(LIBOBJECTS)
102 - del libjpeg.lib
103 * wlib -n libjpeg.lib $(LIBOBJECTS)
104
105cjpeg.exe: $(COBJECTS) libjpeg.lib
106 $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
107
108djpeg.exe: $(DOBJECTS) libjpeg.lib
109 $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
110
111jpegtran.exe: $(TROBJECTS) libjpeg.lib
112 $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
113
114rdjpgcom.exe: rdjpgcom.c
115 $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
116
117wrjpgcom.exe: wrjpgcom.c
118 $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
119
120.c.obj:
121 $(CC) $(CFLAGS) -c $<
122
123jconfig.h: jconfig.doc
124 echo You must prepare a system-dependent jconfig.h file.
125 echo Please read the installation directions in install.doc.
126 exit 1
127
128clean: .SYMBOLIC
129 - del *.obj
130 - del libjpeg.lib
131 - del cjpeg.exe
132 - del djpeg.exe
133 - del jpegtran.exe
134 - del rdjpgcom.exe
135 - del wrjpgcom.exe
136 - del testout*.*
137
138test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC
139 - del testout*.*
140 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
141 djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
142 cjpeg -dct int -outfile testout.jpg testimg.ppm
143 djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
144 cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
145 jpegtran -outfile testoutt.jpg testprog.jpg
146!ifeq SYSTEM DOS
147 fc /b testimg.ppm testout.ppm
148 fc /b testimg.bmp testout.bmp
149 fc /b testimg.jpg testout.jpg
150 fc /b testimg.ppm testoutp.ppm
151 fc /b testimgp.jpg testoutp.jpg
152 fc /b testorig.jpg testoutt.jpg
153!else
154 echo n > n.tmp
155 comp testimg.ppm testout.ppm < n.tmp
156 comp testimg.bmp testout.bmp < n.tmp
157 comp testimg.jpg testout.jpg < n.tmp
158 comp testimg.ppm testoutp.ppm < n.tmp
159 comp testimgp.jpg testoutp.jpg < n.tmp
160 comp testorig.jpg testoutt.jpg < n.tmp
161 del n.tmp
162!endif
163
164
165jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
166jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
167jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
168jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
169jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
170jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
171jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
172jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
173jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
174jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
175jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
176jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
177jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
178jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
179jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
180jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
181jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
182jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
183jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
184jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
185jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
186jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
187jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
188jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
189jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
190jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
191jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
192jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
193jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
194jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
195jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
196jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
197jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
198jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
199jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
200jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
201jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
202jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
203jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
204jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
205jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
206jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
207jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
208jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
209jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
210jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
211jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
212jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
213jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
214jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
215cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
216djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
217jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
218rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
219wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
220cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
221rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
222rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
223transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
224rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
225wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
226rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
227wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
228rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
229wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
230rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
231wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
232rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
233wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h