1991-10-06 20:00:00 -04:00
|
|
|
# Makefile for Independent JPEG Group's software
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# This makefile is suitable for Unix-like systems with non-ANSI compilers.
|
|
|
|
# If you have an ANSI compiler, makefile.ansi is a better starting point.
|
1991-10-06 20:00:00 -04:00
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# Read SETUP instructions before saying "make" !!
|
1991-10-06 20:00:00 -04:00
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# The name of your C compiler:
|
|
|
|
CC= cc
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
# You may need to adjust these cc options:
|
1991-12-12 19:00:00 -05:00
|
|
|
CFLAGS= -O
|
1991-10-06 20:00:00 -04:00
|
|
|
# In particular:
|
|
|
|
# Add -DBSD if on a pure BSD system (see jinclude.h).
|
1991-12-12 19:00:00 -05:00
|
|
|
# Add -DVMS if on a VMS system (see ansi2knr.c).
|
|
|
|
# Add -DMSDOS if on an MSDOS system (see ansi2knr.c).
|
|
|
|
# Add -DMEM_STATS to enable gathering of memory usage statistics.
|
1991-10-06 20:00:00 -04:00
|
|
|
# You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other
|
|
|
|
# symbols listed in jconfig.h, if you prefer not to change jconfig.h.
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# Link-time cc options:
|
|
|
|
LDFLAGS=
|
|
|
|
|
|
|
|
# To link any special libraries, add the necessary -l commands here.
|
|
|
|
# In particular, on some versions of HP-UX (and probably other SysV-derived
|
|
|
|
# systems) there is a faster alternate malloc(3) library that you can use
|
|
|
|
# by adding "-lmalloc" to this line.
|
|
|
|
LDLIBS=
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
# miscellaneous OS-dependent stuff
|
|
|
|
LN= $(CC) # linker
|
|
|
|
RM= rm -f # file deletion command
|
|
|
|
AR= ar rc # library (.a) file creation command
|
|
|
|
AR2= ranlib # second step in .a creation (use "touch" if not needed)
|
|
|
|
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# source files (independently compilable files)
|
|
|
|
SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
|
|
|
|
jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
|
|
|
|
jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
|
|
|
|
jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c \
|
|
|
|
jvirtmem.c jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c \
|
|
|
|
jwrjfif.c jwrgif.c jwrppm.c jwrrle.c jwrtarga.c
|
|
|
|
# files included by source files
|
|
|
|
INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
|
|
|
|
# documentation, test, and support files
|
|
|
|
DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
|
|
|
|
MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
|
|
|
|
makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk makefile.tc \
|
|
|
|
makcjpeg.lst makdjpeg.lst makefile.pwc makcjpeg.cf makdjpeg.cf \
|
|
|
|
makljpeg.cf
|
|
|
|
OTHERFILES= ansi2knr.c config.c
|
1991-10-06 20:00:00 -04:00
|
|
|
TESTFILES= testorig.jpg testimg.ppm testimg.jpg
|
1991-12-12 19:00:00 -05:00
|
|
|
DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(INCLUDES) $(OTHERFILES) \
|
|
|
|
$(TESTFILES)
|
|
|
|
# objectfiles common to cjpeg and djpeg
|
|
|
|
COMOBJECTS= jutils.o jvirtmem.o jerror.o
|
1991-10-06 20:00:00 -04:00
|
|
|
# compression objectfiles
|
1991-12-12 19:00:00 -05:00
|
|
|
CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
|
|
|
|
jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdgif.o jrdppm.o \
|
|
|
|
jrdrle.o jrdtarga.o
|
|
|
|
COBJECTS= jcmain.o $(CLIBOBJECTS) $(COMOBJECTS)
|
1991-10-06 20:00:00 -04:00
|
|
|
# decompression objectfiles
|
1991-12-12 19:00:00 -05:00
|
|
|
DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
|
|
|
|
jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
|
|
|
|
jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
|
|
|
|
DOBJECTS= jdmain.o $(DLIBOBJECTS) $(COMOBJECTS)
|
|
|
|
# These objectfiles are included in libjpeg.a
|
|
|
|
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
|
|
|
|
|
|
|
|
|
|
|
|
all: ansi2knr cjpeg djpeg
|
1991-10-06 20:00:00 -04:00
|
|
|
# By default, libjpeg.a is not built unless you explicitly request it.
|
1991-12-12 19:00:00 -05:00
|
|
|
# You can add libjpeg.a to the line above if you want it built by default.
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
# This rule causes ansi2knr to be invoked. If you use this makefile,
|
|
|
|
# make sure PROTO is not defined by jconfig.h.
|
1991-10-06 20:00:00 -04:00
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
.c.o:
|
|
|
|
./ansi2knr $*.c tmpansi.c
|
|
|
|
$(CC) $(CFLAGS) -c tmpansi.c
|
|
|
|
mv tmpansi.o $*.o
|
|
|
|
$(RM) tmpansi.c
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
ansi2knr: ansi2knr.c
|
1991-12-12 19:00:00 -05:00
|
|
|
$(CC) $(CFLAGS) -o ansi2knr ansi2knr.c
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
cjpeg: ansi2knr $(COBJECTS)
|
1991-10-06 20:00:00 -04:00
|
|
|
$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
|
|
|
|
|
1991-12-12 19:00:00 -05:00
|
|
|
djpeg: ansi2knr $(DOBJECTS)
|
1991-10-06 20:00:00 -04:00
|
|
|
$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS)
|
|
|
|
|
|
|
|
# libjpeg.a is useful if you are including the JPEG software in a larger
|
|
|
|
# program; you'd include it in your link, rather than the individual modules.
|
1991-12-12 19:00:00 -05:00
|
|
|
libjpeg.a: ansi2knr $(LIBOBJECTS)
|
1991-10-06 20:00:00 -04:00
|
|
|
$(RM) libjpeg.a
|
|
|
|
$(AR) libjpeg.a $(LIBOBJECTS)
|
|
|
|
$(AR2) libjpeg.a
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.ppm testout.jpg
|
|
|
|
|
|
|
|
distribute:
|
|
|
|
$(RM) jpegsrc.tar*
|
|
|
|
tar cvf jpegsrc.tar $(DISTFILES)
|
|
|
|
compress -v jpegsrc.tar
|
|
|
|
|
|
|
|
test: cjpeg djpeg
|
|
|
|
$(RM) testout.ppm testout.jpg
|
|
|
|
./djpeg testorig.jpg >testout.ppm
|
|
|
|
./cjpeg testimg.ppm >testout.jpg
|
|
|
|
cmp testimg.ppm testout.ppm
|
|
|
|
cmp testimg.jpg testout.jpg
|
|
|
|
|
|
|
|
|
|
|
|
jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
|
1991-10-06 20:00:00 -04:00
|
|
|
jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h
|
1991-10-06 20:00:00 -04:00
|
|
|
jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
|
1991-10-06 20:00:00 -04:00
|
|
|
jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h
|
1991-10-06 20:00:00 -04:00
|
|
|
jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jvirtmem.o : jvirtmem.c jinclude.h jconfig.h jpegdata.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h
|
1991-10-06 20:00:00 -04:00
|
|
|
jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h
|
1991-12-12 19:00:00 -05:00
|
|
|
jwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h
|
|
|
|
jwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h
|