1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
# Makefile for Independent JPEG Group's software
# Temporary makefile for working on prototype V5 code.
# Check and edit these settings:
# The name of your C compiler:
CC= cc
# If your compiler does not handle ANSI function prototypes,
# also uncomment the .c.o rule below.
# You may need to adjust these cc options:
CFLAGS= -g
# In particular:
# Please turn on any extra-warning switches you have.
# For example, I normally use "-Wall" with gcc.
# Add -DBSD if on a pure BSD system (see jinclude.h).
# Add -DMEM_STATS to enable gathering of memory usage statistics.
# Link-time cc options:
LDFLAGS= -g
# To link any special libraries, add the necessary -l commands here.
LDLIBS=
# miscellaneous OS-dependent stuff
# linker
LN= $(CC)
# file deletion command
RM= rm -f
# library (.a) file creation command
AR= ar rc
# second step in .a creation (use "touch" if not needed)
AR2= ranlib
# End of settings.
# Put here the object file name for the correct system-dependent memory
# manager file. For Unix this is usually jmemnobs.o, but you may need
# to use jmemansi.o or jmemname.o if you have limited swap space.
# (For now, just use jmemnobs.o, 'cause the other options ain't ready.)
SYSDEPMEM= jmemnobs.o
# source files (independently compilable files)
SOURCES= cjpeg.c djpeg.c jdatasrc.c jdatadst.c \
jcapi.c jccoefct.c jccolor.c jcdctmgr.c \
jchuff.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
jcprepct.c jcsample.c jdapi.c jdcoefct.c jdcolor.c jddctmgr.c \
jdhuff.c jdmainct.c jdmarker.c jdmaster.c \
jdpostct.c jdsample.c jerror.c jfwddct.c jmemmgr.c jmemnobs.c \
jrevdct.c jutils.c rdppm.c wrppm.c
# files included by source files
INCLUDES= cdjpeg.h jerror.h jinclude.h jmemsys.h jmorecfg.h cderror.h \
jpegint.h jpeglib.h jversion.h
# documentation, test, and support files
DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 example.c \
libjpeg.doc structure.doc coderules.doc filelist.doc change.log
MAKEFILES= makefile.test
OTHERFILES= jconfig.doc ansi2knr.c ansi2knr.1
TESTFILES= testorig.jpg testimg.ppm testimg.jpg
DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(INCLUDES) \
$(OTHERFILES) $(TESTFILES)
# objectfiles common to compression and decompression
COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
# compression objectfiles
CLIBOBJECTS= jcapi.o jcparam.o jdatadst.o jcmaster.o jcmarker.o \
jcmainct.o jcprepct.o jccoefct.o \
jccolor.o jcsample.o jchuff.o jcdctmgr.o jfwddct.o
# COBJECTS= cjpeg.o rdgif.o rdppm.o rdrle.o rdtarga.o
COBJECTS= cjpeg.o rdppm.o \
$(CLIBOBJECTS) $(COMOBJECTS)
# decompression objectfiles
DLIBOBJECTS= jdapi.o jdatasrc.o jdmaster.o jdmarker.o \
jdmainct.o jdcoefct.o jdpostct.o \
jddctmgr.o jrevdct.o jdhuff.o jdsample.o jdcolor.o
# DOBJECTS= djpeg.o wrgif.o wrppm.o wrrle.o wrtarga.o
DOBJECTS= djpeg.o wrppm.o \
$(DLIBOBJECTS) $(COMOBJECTS)
# These objectfiles are included in libjpeg.a
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
all: cjpeg djpeg
# By default, libjpeg.a is not built unless you explicitly request it.
# You can add libjpeg.a to the line above if you want it built by default.
# Remove the # marks to enable use of ansi2knr:
#.c.o:
# ./ansi2knr $*.c tmpansi.c
# $(CC) $(CFLAGS) -c tmpansi.c
# mv tmpansi.o $*.o
# $(RM) tmpansi.c
ansi2knr: ansi2knr.c
$(CC) $(CFLAGS) -o ansi2knr ansi2knr.c
cjpeg: $(COBJECTS)
$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
djpeg: $(DOBJECTS)
$(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.
libjpeg.a: $(LIBOBJECTS)
$(RM) libjpeg.a
$(AR) libjpeg.a $(LIBOBJECTS)
$(AR2) libjpeg.a
clean:
$(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.*
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
depend:
gcc -MM $(SOURCES) >depend
# Rest is from file 'depend'
cjpeg.o : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h \
cderror.h jversion.h
djpeg.o : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h \
cderror.h jversion.h
jdatasrc.o : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatadst.o : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jcapi.o : jcapi.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jccoefct.o : jccoefct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jccolor.o : jccolor.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jcdctmgr.o : jcdctmgr.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jchuff.o : jchuff.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jcmainct.o : jcmainct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jcmarker.o : jcmarker.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jcomapi.o : jcomapi.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jcparam.o : jcparam.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jcprepct.o : jcprepct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jcsample.o : jcsample.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdapi.o : jdapi.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.o : jdcoefct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jddctmgr.o : jddctmgr.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jdmainct.o : jdmainct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdmarker.o : jdmarker.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdpostct.o : jdpostct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jdsample.o : jdsample.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h
jerror.o : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h \
jmemsys.h
jmemnobs.o : jmemnobs.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h \
jerror.h jmemsys.h
jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
jutils.o : jutils.c jinclude.h jconfig.h jpegint.h jpeglib.h jmorecfg.h jerror.h
rdppm.o : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h \
cderror.h
wrppm.o : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h \
cderror.h
|