1# 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= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c &
41        jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c &
42        jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c &
43        jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c &
44        jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c &
45        jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c &
46        jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.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= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h &
57        jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
58# documentation, test, and support files
59DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
60        wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt &
61        coderules.txt filelist.txt change.log
62MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc &
63        makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 &
64        makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 &
65        makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 &
66        maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 &
67        makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 &
68        makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 &
69        makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st &
70        makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms &
71        makefile.vms makvms.opt
72CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
73        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
74        jconfig.vms
75CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
76OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm &
77        libjpeg.map
78TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
79        testimgp.jpg
80DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
81        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
82# library object files common to compression and decompression
83COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
84# compression library object files
85CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj &
86        jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj &
87        jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj &
88        jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
89# decompression library object files
90DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj &
91        jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj &
92        jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj &
93        jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj &
94        jdmerge.obj
95# These objectfiles are included in libjpeg.lib
96LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
97# object files for sample applications (excluding library files)
98COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
99        rdswitch.obj cdjpeg.obj
100DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
101        rdcolmap.obj cdjpeg.obj
102TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
103
104
105all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
106
107libjpeg.lib: $(LIBOBJECTS)
108	- del libjpeg.lib
109	* wlib -n libjpeg.lib $(LIBOBJECTS)
110
111cjpeg.exe: $(COBJECTS) libjpeg.lib
112	$(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
113
114djpeg.exe: $(DOBJECTS) libjpeg.lib
115	$(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
116
117jpegtran.exe: $(TROBJECTS) libjpeg.lib
118	$(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
119
120rdjpgcom.exe: rdjpgcom.c
121	$(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
122
123wrjpgcom.exe: wrjpgcom.c
124	$(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
125
126.c.obj:
127	$(CC) $(CFLAGS) -c $<
128
129jconfig.h: jconfig.txt
130	echo You must prepare a system-dependent jconfig.h file.
131	echo Please read the installation directions in install.txt.
132	exit 1
133
134clean: .SYMBOLIC
135	- del *.obj
136	- del libjpeg.lib
137	- del cjpeg.exe
138	- del djpeg.exe
139	- del jpegtran.exe
140	- del rdjpgcom.exe
141	- del wrjpgcom.exe
142	- del testout*.*
143
144test: cjpeg.exe djpeg.exe jpegtran.exe  .SYMBOLIC
145	- del testout*.*
146	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
147	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
148	cjpeg -dct int -outfile testout.jpg  testimg.ppm
149	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
150	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
151	jpegtran -outfile testoutt.jpg testprog.jpg
152!ifeq SYSTEM DOS
153	fc /b testimg.ppm testout.ppm
154	fc /b testimg.bmp testout.bmp
155	fc /b testimg.jpg testout.jpg
156	fc /b testimg.ppm testoutp.ppm
157	fc /b testimgp.jpg testoutp.jpg
158	fc /b testorig.jpg testoutt.jpg
159!else
160	echo n > n.tmp
161	comp testimg.ppm testout.ppm < n.tmp
162	comp testimg.bmp testout.bmp < n.tmp
163	comp testimg.jpg testout.jpg < n.tmp
164	comp testimg.ppm testoutp.ppm < n.tmp
165	comp testimgp.jpg testoutp.jpg < n.tmp
166	comp testorig.jpg testoutt.jpg < n.tmp
167	del n.tmp
168!endif
169
170
171jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
172jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
173jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
174jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
175jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
176jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
177jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
178jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
179jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
180jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
181jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
182jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
183jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
184jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
185jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
186jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
187jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
188jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
189jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
190jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
191jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
192jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
193jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
194jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
195jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
196jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
197jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
198jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
199jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
200jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
201jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
202jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
203jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
204jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
205jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
206jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
207jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
208jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
209jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
210jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
211jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
212jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
213jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
214jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
215jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
216jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
217jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
218jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
219jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
220jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
221cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
222djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
223jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
224rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
225wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
226cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
227rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
228rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
229transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
230rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
231wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
232rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
233wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
234rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
235wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
236rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
237wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
238rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
239wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
240