1# Makefile for Independent JPEG Group's software
2
3# This makefile is for Amiga systems using SAS C 6.0 and up.
4# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda.
5
6# Read installation instructions before saying "make" !!
7
8# The name of your C compiler:
9CC= sc
10
11# You may need to adjust these cc options:
12# Uncomment the following lines for generic 680x0 version
13ARCHFLAGS= cpu=any
14SUFFIX=
15
16# Uncomment the following lines for 68030-only version
17#ARCHFLAGS= cpu=68030
18#SUFFIX=.030
19
20CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \
21	ignore=104 ignore=304 ignore=306
22# ignore=104 disables warnings for mismatched const qualifiers
23# ignore=304 disables warnings for variables being optimized out
24# ignore=306 disables warnings for the inlining of functions
25# Generally, we recommend defining any configuration symbols in jconfig.h,
26# NOT via define switches here.
27
28# Link-time cc options:
29LDFLAGS= SC SD ND BATCH
30
31# To link any special libraries, add the necessary commands here.
32LDLIBS= LIB:scm.lib LIB:sc.lib
33
34# Put here the object file name for the correct system-dependent memory
35# manager file.  For Amiga we recommend jmemname.o.
36SYSDEPMEM= jmemname.o
37
38# miscellaneous OS-dependent stuff
39# linker
40LN= slink
41# file deletion command
42RM= delete quiet
43# library (.lib) file creation command
44AR= oml
45
46# End of configurable options.
47
48
49# source files: JPEG library proper
50LIBSOURCES= jcapi.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcmainct.c \
51        jcmarker.c jcmaster.c jcomapi.c jcparam.c jcprepct.c jcsample.c \
52        jdapi.c jdatasrc.c jdatadst.c jdcoefct.c jdcolor.c jddctmgr.c \
53        jdhuff.c jdmainct.c jdmarker.c jdmaster.c jdpostct.c jdsample.c \
54        jerror.c jutils.c jfdctfst.c jfdctflt.c jfdctint.c jidctfst.c \
55        jidctflt.c jidctint.c jidctred.c jquant1.c jquant2.c jdmerge.c \
56        jmemmgr.c jmemansi.c jmemname.c jmemnobs.c jmemdos.c
57# source files: cjpeg/djpeg applications, also rdjpgcom/wrjpgcom
58APPSOURCES= cjpeg.c djpeg.c rdcolmap.c rdppm.c wrppm.c rdgif.c wrgif.c \
59        rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c rdjpgcom.c \
60        wrjpgcom.c
61SOURCES= $(LIBSOURCES) $(APPSOURCES)
62# files included by source files
63INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
64        jpeglib.h jversion.h cdjpeg.h cderror.h
65# documentation, test, and support files
66DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 rdjpgcom.1 wrjpgcom.1 \
67        example.c libjpeg.doc structure.doc coderules.doc filelist.doc \
68        change.log
69MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.manx \
70        makefile.sas makcjpeg.st makdjpeg.st makljpeg.st makefile.bcc \
71        makefile.mc6 makefile.dj makefile.mms makefile.vms makvms.opt
72CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \
73        jconfig.mc6 jconfig.dj jconfig.vms
74OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
75TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
76DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
77        $(OTHERFILES) $(TESTFILES)
78# library object files common to compression and decompression
79COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
80# compression library object files
81CLIBOBJECTS= jcapi.o jcparam.o jdatadst.o jcmaster.o jcmarker.o jcmainct.o \
82        jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o \
83        jfdctfst.o jfdctflt.o jfdctint.o
84# decompression library object files
85DLIBOBJECTS= jdapi.o jdatasrc.o jdmaster.o jdmarker.o jdmainct.o jdcoefct.o \
86        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
87        jdhuff.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
88# These objectfiles are included in libjpeg.lib
89LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
90# object files for cjpeg and djpeg applications (excluding library files)
91COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o
92DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o
93
94
95all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX)
96
97libjpeg.lib: $(LIBOBJECTS)
98	-$(RM) libjpeg.lib
99	$(AR) libjpeg.lib r $(LIBOBJECTS)
100
101cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib
102	$(LN) <WITH <
103$(LDFLAGS)
104TO cjpeg$(SUFFIX)
105FROM LIB:c.o $(COBJECTS)
106LIB libjpeg.lib $(LDLIBS)
107<
108
109djpeg$(SUFFIX): $(DOBJECTS) libjpeg.lib
110	$(LN) <WITH <
111$(LDFLAGS)
112TO djpeg$(SUFFIX)
113FROM LIB:c.o $(DOBJECTS)
114LIB libjpeg.lib $(LDLIBS)
115<
116
117rdjpgcom$(SUFFIX): rdjpgcom.o
118	$(LN) <WITH <
119$(LDFLAGS)
120TO rdjpgcom$(SUFFIX)
121FROM LIB:c.o rdjpgcom.o
122LIB $(LDLIBS)
123<
124
125wrjpgcom$(SUFFIX): wrjpgcom.o
126	$(LN) <WITH <
127$(LDFLAGS)
128TO wrjpgcom$(SUFFIX)
129FROM LIB:c.o wrjpgcom.o
130LIB $(LDLIBS)
131<
132
133jconfig.h: jconfig.doc
134	echo You must prepare a system-dependent jconfig.h file.
135	echo Please read the installation directions in install.doc.
136	exit 1
137
138clean:
139	-$(RM) *.o cjpeg djpeg cjpeg.030 djpeg.030 libjpeg.lib core testout.*
140	-$(RM) rdjpgcom wrjpgcom rdjpgcom.030 wrjpgcom.030
141
142test: cjpeg djpeg
143	-$(RM) testout.ppm testout.gif testout.jpg
144	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
145	djpeg -dct int -gif -outfile testout.gif  testorig.jpg
146	cjpeg -dct int -outfile testout.jpg  testimg.ppm
147	cmp testimg.ppm testout.ppm
148	cmp testimg.gif testout.gif
149	cmp testimg.jpg testout.jpg
150
151
152jcapi.o : jcapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
153jccoefct.o : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
154jccolor.o : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
155jcdctmgr.o : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
156jchuff.o : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
157jcmainct.o : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
158jcmarker.o : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
159jcmaster.o : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
160jcomapi.o : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
161jcparam.o : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
162jcprepct.o : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
163jcsample.o : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
164jdapi.o : jdapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
165jdatasrc.o : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
166jdatadst.o : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
167jdcoefct.o : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
168jdcolor.o : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
169jddctmgr.o : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
170jdhuff.o : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
171jdmainct.o : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
172jdmarker.o : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
173jdmaster.o : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
174jdpostct.o : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
175jdsample.o : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
176jerror.o : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
177jutils.o : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
178jfdctfst.o : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
179jfdctflt.o : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
180jfdctint.o : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
181jidctfst.o : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
182jidctflt.o : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
183jidctint.o : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
184jidctred.o : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
185jquant1.o : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
186jquant2.o : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
187jdmerge.o : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
188jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
189jmemansi.o : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
190jmemname.o : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
191jmemnobs.o : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
192jmemdos.o : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
193cjpeg.o : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
194djpeg.o : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
195rdcolmap.o : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
196rdppm.o : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
197wrppm.o : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
198rdgif.o : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
199wrgif.o : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
200rdtarga.o : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
201wrtarga.o : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
202rdbmp.o : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
203wrbmp.o : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
204rdrle.o : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
205wrrle.o : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
206rdjpgcom.o : rdjpgcom.c jinclude.h jconfig.h
207wrjpgcom.o : wrjpgcom.c jinclude.h jconfig.h
208