1# Makefile for Independent JPEG Group's software
2
3# This makefile is suitable for Borland C on MS-DOS.
4# It works with Borland C++ 32-bit for DOS, revision 5.0 or later.
5# Thanks to Tom Wright and Ge' Weijers (original DOS) and
6# Joe Slater for adding 32-bit additions (needed for Borland
7# revision 5.5).
8
9# Read installation instructions before saying "make" !!
10
11# The name of your C compiler:
12CC= bcc32
13
14# You may need to adjust these cc options:
15CFLAGS= -O2 -w-par -w-stu -w-ccc -w-rch -w-aus
16# -w-par suppresses warnings about unused function parameters
17# -w-stu suppresses warnings about incomplete structures
18# -w-ccc suppresses warnings about compile-time-constant conditions
19# -w-rch suppresses warnings about unreachable code
20# Generally, we recommend defining any configuration symbols in jconfig.h,
21# NOT via -D switches here.
22
23# Link-time cc options:
24LDFLAGS=
25# -lc case-significant link
26
27# Put here the object file name for the correct system-dependent memory
28# manager file.
29# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
30SYSDEPMEM= jmemnobs.obj
31SYSDEPMEMLIB= +jmemnobs.obj
32
33# End of configurable options.
34
35
36# source files: JPEG library proper
37LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
38        jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
39        jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
40        jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
41        jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
42        jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
43        jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
44        jquant2.c jutils.c jmemmgr.c
45# memmgr back ends: compile only one of these into a working library
46SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
47# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
48APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
49        rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
50        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
51SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
52# files included by source files
53INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
54        jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
55# documentation, test, and support files
56DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
57        wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
58        coderules.txt filelist.txt change.log
59MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.b32 \
60        makefile.bcc makefile.mc6 makefile.dj makefile.wat makefile.vc \
61        makejdsw.vc6 makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 \
62        makecdep.vc6 makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 \
63        makedmak.vc6 maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 \
64        makerdsp.vc6 makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 \
65        makejsln.v10 makeasln.v10 makejvcx.v10 makejfil.v10 makecvcx.v10 \
66        makecfil.v10 makedvcx.v10 makedfil.v10 maketvcx.v10 maketfil.v10 \
67        makervcx.v10 makerfil.v10 makewvcx.v10 makewfil.v10 makeproj.mac \
68        makcjpeg.st makdjpeg.st makljpeg.st maktjpeg.st makefile.manx \
69        makefile.sas makefile.mms makefile.vms makvms.opt
70CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
71        jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
72        jconfig.vms
73CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \
74        missing ar-lib
75OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map
76TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
77        testimgp.jpg
78DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
79        $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
80# library object files common to compression and decompression
81COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
82# compression library object files
83CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
84        jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
85        jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
86        jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
87# decompression library object files
88DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
89        jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
90        jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
91        jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
92        jdmerge.obj
93# These objectfiles are included in libjpeg.lib
94LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
95# object files for sample applications (excluding library files)
96COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
97        rdswitch.obj cdjpeg.obj
98DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
99        rdcolmap.obj cdjpeg.obj
100TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
101
102
103all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
104
105libjpeg.lib: $(LIBOBJECTS)
106        - del libjpeg.lib
107        tlib libjpeg.lib /E /C @&&|
108+jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj +jcparam.obj &
109+jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj &
110+jcprepct.obj +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj &
111+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
112+jdapistd.obj +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj &
113+jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj +jdcoefct.obj &
114+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj &
115+jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj &
116+jaricom.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
117$(SYSDEPMEMLIB)
118|
119
120cjpeg.exe: $(COBJECTS) libjpeg.lib
121        $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib
122
123djpeg.exe: $(DOBJECTS) libjpeg.lib
124        $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib
125
126jpegtran.exe: $(TROBJECTS) libjpeg.lib
127        $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib
128
129rdjpgcom.exe: rdjpgcom.c
130        $(CC) $(CFLAGS) rdjpgcom.c
131
132wrjpgcom.exe: wrjpgcom.c
133        $(CC) $(CFLAGS) wrjpgcom.c
134
135# This "{}" syntax allows Borland Make to "batch" source files.
136# In this way, each run of the compiler can build many modules.
137.c.obj:
138        $(CC) $(CFLAGS) -c{ $<}
139
140jconfig.h: jconfig.txt
141        echo You must prepare a system-dependent jconfig.h file.
142        echo Please read the installation directions in install.txt.
143        exit 1
144
145clean:
146        - del *.obj
147        - del libjpeg.lib
148        - del cjpeg.exe
149        - del djpeg.exe
150        - del jpegtran.exe
151        - del rdjpgcom.exe
152        - del wrjpgcom.exe
153        - del testout*.*
154
155test: cjpeg.exe djpeg.exe jpegtran.exe
156        - del testout*.*
157        djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
158        djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
159        cjpeg -dct int -outfile testout.jpg  testimg.ppm
160        djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
161        cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
162        jpegtran -outfile testoutt.jpg testprog.jpg
163        echo n > n.tmp
164        comp testimg.ppm testout.ppm < n.tmp
165        comp testimg.bmp testout.bmp < n.tmp
166        comp testimg.jpg testout.jpg < n.tmp
167        comp testimg.ppm testoutp.ppm < n.tmp
168        comp testimgp.jpg testoutp.jpg < n.tmp
169        comp testorig.jpg testoutt.jpg < n.tmp
170        del n.tmp
171
172
173jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
174jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
175jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
176jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
177jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
178jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
179jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
180jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
181jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
182jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
183jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
184jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
185jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
186jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
187jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
188jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
189jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
190jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
191jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
192jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
193jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
194jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
195jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
196jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
197jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
198jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
199jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
200jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
201jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
202jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
203jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
204jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
205jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
206jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
207jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
208jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
209jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
210jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
211jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
212jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
213jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
214jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
215jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
216jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
217jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
218jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
219jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
220jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
221jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
222jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
223cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
224djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
225jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
226rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
227wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
228cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
229rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
230rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
231transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
232rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
233wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
234rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
235wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
236rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
237wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
238rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
239wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
240rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
241wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
242jmemdosa.obj: jmemdosa.asm
243        tasm /mx jmemdosa.asm
244