1# Makefile for Independent JPEG Group's software
2
3# This makefile is suitable for Borland C++ on Win32.
4# It has been tested with Borland C++ 5.02, but may work with earlier
5# versions.
6
7# Read installation instructions before saying "make" !!
8
9.USESHELL :;
10
11# The name of your C compiler:
12CC= bcc32
13
14# You may need to adjust these cc options:
15CFLAGS= -w-par -O2 -tWD
16# -w-par suppresses warnings about unused function parameters
17# -O2 enables full code optimization
18# -tWD generates code suitable for DLLs
19# Generally, we recommend defining any configuration symbols in jconfig.h,
20# NOT via -D switches here.
21
22# Link-time cc options:
23LDFLAGS=
24
25# Put here the object file name for the correct system-dependent memory
26# manager file.  For DOS, we recommend jmemdos.c and jmemdosa.asm.
27# If you change this, you'll need to modify the linker response file
28# name list, below, by hand!
29SYSDEPMEM= jmemnobs.obj
30
31# End of configurable options.
32
33
34# source files: JPEG library proper
35LIBSOURCES= jcapi.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcmainct.c \
36        jcmarker.c jcmaster.c jcomapi.c jcparam.c jcprepct.c jcsample.c \
37        jdapi.c jdatasrc.c jdatadst.c jdcoefct.c jdcolor.c jddctmgr.c \
38        jdhuff.c jdmainct.c jdmarker.c jdmaster.c jdpostct.c jdsample.c \
39        jerror.c jutils.c jfdctfst.c jfdctflt.c jfdctint.c jidctfst.c \
40        jidctflt.c jidctint.c jidctred.c jquant1.c jquant2.c jdmerge.c \
41        jmemmgr.c jmemansi.c jmemname.c jmemnobs.c jmemdos.c
42# source files: cjpeg/djpeg applications, also rdjpgcom/wrjpgcom
43APPSOURCES= cjpeg.c djpeg.c rdcolmap.c rdppm.c wrppm.c rdgif.c wrgif.c \
44        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c rdjpgcom.c \
45        wrjpgcom.c
46SOURCES= $(LIBSOURCES) $(APPSOURCES)
47# files included by source files
48INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
49        jpeglib.h jversion.h cdjpeg.h cderror.h
50# documentation, test, and support files
51DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 rdjpgcom.1 wrjpgcom.1 \
52        example.c libjpeg.doc structure.doc coderules.doc filelist.doc \
53        change.log
54MKFILES= configure makefile.auto makefile.ansi makefile.unix makefile.manx \
55        makefile.sas makcjpeg.st makdjpeg.st makljpeg.st makefile.bcc \
56        makefile.mc6 makefile.dj makefile.mms makefile.vms makvms.opt
57CONFIGFILES= jconfig.auto jconfig.manx jconfig.sas jconfig.st jconfig.bcc \
58        jconfig.mc6 jconfig.dj jconfig.vms
59OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
60TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
61DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
62        $(OTHERFILES) $(TESTFILES)
63# library object files common to compression and decompression
64COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
65# compression library object files
66CLIBOBJECTS= jcapi.obj jcparam.obj jdatadst.obj jcmaster.obj jcmarker.obj \
67        jcmainct.obj jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj \
68        jchuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
69# decompression library object files
70DLIBOBJECTS= jdapi.obj jdatasrc.obj jdmaster.obj jdmarker.obj jdmainct.obj \
71        jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
72        jidctint.obj jidctred.obj jdhuff.obj jdsample.obj jdcolor.obj \
73        jquant1.obj jquant2.obj jdmerge.obj
74# These objectfiles are included in libjpeg.lib
75LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
76# object files for cjpeg and djpeg applications (excluding library files)
77COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj
78DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
79        rdcolmap.obj
80
81all: libjpeg.lib cjpeg.exe djpeg.exe rdjpgcom.exe wrjpgcom.exe
82
83libjpeg.lib: $(LIBOBJECTS)
84	-del libjpeg.lib
85	tlib libjpeg.lib $(LIBOBJECTS:^"+")
86
87cjpeg.exe: $(COBJECTS) libjpeg.lib
88	$(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib
89
90djpeg.exe: $(DOBJECTS) libjpeg.lib
91	$(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib
92
93rdjpgcom.exe: rdjpgcom.c
94	$(CC) -O rdjpgcom.c
95
96# wrjpgcom needs large model so it can malloc a 64K chunk
97wrjpgcom.exe: wrjpgcom.c
98	$(CC) -O wrjpgcom.c
99
100.c.obj:
101	$(CC) $(CFLAGS) -c $<
102
103jconfig.h: jconfig.doc
104	echo You must prepare a system-dependent jconfig.h file.
105	echo Please read the installation directions in install.doc.
106	exit 1
107
108clean:
109	-del *.obj
110	-del libjpeg.lib
111	-del cjpeg.exe
112	-del djpeg.exe
113	-del rdjpgcom.exe
114	-del wrjpgcom.exe
115	-del testout.*
116
117test: cjpeg.exe djpeg.exe
118	-del testout.*
119	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
120	djpeg -dct int -gif -outfile testout.gif  testorig.jpg
121	cjpeg -dct int -outfile testout.jpg  testimg.ppm
122	fc /b testimg.ppm testout.ppm
123	fc /b testimg.gif testout.gif
124	fc /b testimg.jpg testout.jpg
125
126
127jcapi.obj : jcapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
128jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
129jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
130jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
131jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
132jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
133jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
134jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
135jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
136jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
137jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
138jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
139jdapi.obj : jdapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
140jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
141jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
142jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
143jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
144jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
145jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
146jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
147jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
148jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
149jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
150jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
151jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
152jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
153jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
154jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
155jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
156jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
157jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
158jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
159jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
160jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
161jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
162jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
163jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
164jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
165jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
166jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
167jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
168cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
169djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
170rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
171rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
172wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
173rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
174wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
175rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
176wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
177rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
178wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
179rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
180wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
181rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h
182wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h
183jmemdosa.obj : jmemdosa.asm
184	tasm /mx jmemdosa.asm
185