blob: ff022a0825a72145858da2fed35f9888a347d1e9 [file] [log] [blame]
Thomas G. Lanebc79e061995-08-02 00:00:00 +00001# 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 &
Thomas G. Lane489583f1996-02-07 00:00:00 +000047 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
Thomas G. Lanebc79e061995-08-02 00:00:00 +000050# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
51APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c &
52 rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c &
53 wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
Thomas G. Lane489583f1996-02-07 00:00:00 +000054SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
Thomas G. Lanebc79e061995-08-02 00:00:00 +000055# 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
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 makcjpeg.st makdjpeg.st &
64 makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms &
65 makefile.vms makvms.opt
66CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc &
67 jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms
68OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
69TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg &
70 testimgp.jpg
71DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
72 $(OTHERFILES) $(TESTFILES)
73# library object files common to compression and decompression
74COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
75# compression library object files
76CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
77 jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
78 jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
79 jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
80# decompression library object files
81DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
82 jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
83 jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
84 jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
85 jquant1.obj jquant2.obj jdmerge.obj
86# These objectfiles are included in libjpeg.lib
87LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
88# object files for sample applications (excluding library files)
89COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
90 rdswitch.obj cdjpeg.obj
91DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
92 rdcolmap.obj cdjpeg.obj
93TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj
94
95
96all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
97
98libjpeg.lib: $(LIBOBJECTS)
99 - del libjpeg.lib
100 * wlib -n libjpeg.lib $(LIBOBJECTS)
101
102cjpeg.exe: $(COBJECTS) libjpeg.lib
103 $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
104
105djpeg.exe: $(DOBJECTS) libjpeg.lib
106 $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
107
108jpegtran.exe: $(TROBJECTS) libjpeg.lib
109 $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
110
111rdjpgcom.exe: rdjpgcom.c
112 $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
113
114wrjpgcom.exe: wrjpgcom.c
115 $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
116
117.c.obj:
118 $(CC) $(CFLAGS) -c $<
119
120jconfig.h: jconfig.doc
121 echo You must prepare a system-dependent jconfig.h file.
122 echo Please read the installation directions in install.doc.
123 exit 1
124
125clean: .SYMBOLIC
126 - del *.obj
127 - del libjpeg.lib
128 - del cjpeg.exe
129 - del djpeg.exe
130 - del jpegtran.exe
131 - del rdjpgcom.exe
132 - del wrjpgcom.exe
133 - del testout*.*
134
135test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC
136 - del testout*.*
137 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
138 djpeg -dct int -gif -outfile testout.gif testorig.jpg
139 cjpeg -dct int -outfile testout.jpg testimg.ppm
140 djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
141 cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
142 jpegtran -outfile testoutt.jpg testprog.jpg
143!ifeq SYSTEM DOS
144 fc /b testimg.ppm testout.ppm
145 fc /b testimg.gif testout.gif
146 fc /b testimg.jpg testout.jpg
147 fc /b testimg.ppm testoutp.ppm
148 fc /b testimgp.jpg testoutp.jpg
149 fc /b testorig.jpg testoutt.jpg
150!else
151 echo n > n.tmp
152 comp testimg.ppm testout.ppm < n.tmp
153 comp testimg.gif testout.gif < n.tmp
154 comp testimg.jpg testout.jpg < n.tmp
155 comp testimg.ppm testoutp.ppm < n.tmp
156 comp testimgp.jpg testoutp.jpg < n.tmp
157 comp testorig.jpg testoutt.jpg < n.tmp
158 del n.tmp
159!endif
160
161
162jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
163jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
164jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
165jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
166jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
167jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
168jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
169jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
170jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
171jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
172jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
173jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
174jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
175jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
176jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
177jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
178jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
179jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
180jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
181jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
182jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
183jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
184jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
185jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
186jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
187jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
188jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
189jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
190jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
191jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
192jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
193jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
194jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
195jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
196jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
197jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
198jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
199jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
200jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
201jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
202jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
203jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
204jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
205jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
206jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
207jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
208jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
209jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
210jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Thomas G. Lane489583f1996-02-07 00:00:00 +0000211jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Thomas G. Lanebc79e061995-08-02 00:00:00 +0000212cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
213djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
214jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
215cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
216rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
217rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
218rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
219wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
220rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
221wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
222rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
223wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
224rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
225wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
226rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
227wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
228rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
229wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h