| 1 |
# Makefile for Independent JPEG Group's software |
| 2 |
|
| 3 |
# This makefile is for DJGPP (Delorie's GNU C port) on MS-DOS. |
| 4 |
# Say "make exe" to get stub-style .exe's, or |
| 5 |
# "make standalone" to get standalone .exe's. |
| 6 |
|
| 7 |
# Read installation instructions before saying "make" !! |
| 8 |
|
| 9 |
# To do "make standalone", you'll need to be sure this points to go32.exe: |
| 10 |
GO32= |
| 11 |
|
| 12 |
# The name of your C compiler: |
| 13 |
CC= gcc |
| 14 |
|
| 15 |
# You may need to adjust these cc options: |
| 16 |
CFLAGS= -O2 -Wall -Wno-comment -Wno-main |
| 17 |
# Generally, we recommend defining any configuration symbols in jconfig.h, |
| 18 |
# NOT via -D switches here. |
| 19 |
|
| 20 |
# Link-time cc options: |
| 21 |
LDFLAGS= |
| 22 |
|
| 23 |
# To link any special libraries, add the necessary -l commands here. |
| 24 |
LDLIBS= |
| 25 |
|
| 26 |
# Put here the object file name for the correct system-dependent memory |
| 27 |
# manager file. For DJGPP this is usually jmemnobs.o, but you could |
| 28 |
# use jmemname.o if you want to use named temp files instead of swap space. |
| 29 |
SYSDEPMEM= jmemnobs.o |
| 30 |
|
| 31 |
# miscellaneous OS-dependent stuff |
| 32 |
# linker |
| 33 |
LN= $(CC) |
| 34 |
# file deletion command |
| 35 |
RM= perl -e "unlink(map(glob($$_),@ARGV))" |
| 36 |
# library (.a) file creation command |
| 37 |
AR= ar rc |
| 38 |
# second step in .a creation (use "touch" if not needed) |
| 39 |
AR2= ranlib |
| 40 |
|
| 41 |
# End of configurable options. |
| 42 |
|
| 43 |
|
| 44 |
# source files: JPEG library proper |
| 45 |
LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ |
| 46 |
jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ |
| 47 |
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ |
| 48 |
jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ |
| 49 |
jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ |
| 50 |
jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ |
| 51 |
jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ |
| 52 |
jquant2.c jutils.c jmemmgr.c |
| 53 |
# memmgr back ends: compile only one of these into a working library |
| 54 |
SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c |
| 55 |
# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom |
| 56 |
APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ |
| 57 |
rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ |
| 58 |
wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c |
| 59 |
SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) |
| 60 |
# files included by source files |
| 61 |
INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ |
| 62 |
jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h |
| 63 |
# documentation, test, and support files |
| 64 |
DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ |
| 65 |
wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ |
| 66 |
coderules.doc filelist.doc change.log |
| 67 |
MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ |
| 68 |
makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ |
| 69 |
makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ |
| 70 |
makefile.vms makvms.opt |
| 71 |
CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ |
| 72 |
jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms |
| 73 |
OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm |
| 74 |
TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ |
| 75 |
testimgp.jpg |
| 76 |
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ |
| 77 |
$(OTHERFILES) $(TESTFILES) |
| 78 |
# library object files common to compression and decompression |
| 79 |
COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) |
| 80 |
# compression library object files |
| 81 |
CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ |
| 82 |
jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ |
| 83 |
jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ |
| 84 |
jfdctint.o |
| 85 |
# decompression library object files |
| 86 |
DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ |
| 87 |
jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ |
| 88 |
jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ |
| 89 |
jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o |
| 90 |
# These objectfiles are included in libjpeg.a |
| 91 |
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) |
| 92 |
# object files for sample applications (excluding library files) |
| 93 |
COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ |
| 94 |
cdjpeg.o |
| 95 |
DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ |
| 96 |
cdjpeg.o |
| 97 |
TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o |
| 98 |
|
| 99 |
.c.o: |
| 100 |
$(CC) $(CFLAGS) -c -o $@ $< |
| 101 |
|
| 102 |
all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom |
| 103 |
|
| 104 |
libjpeg.a: $(LIBOBJECTS) |
| 105 |
-$(RM) libjpeg.a |
| 106 |
$(AR) libjpeg.a $(LIBOBJECTS) |
| 107 |
$(AR2) libjpeg.a |
| 108 |
|
| 109 |
cjpeg: $(COBJECTS) libjpeg.a |
| 110 |
$(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) |
| 111 |
|
| 112 |
djpeg: $(DOBJECTS) libjpeg.a |
| 113 |
$(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) |
| 114 |
|
| 115 |
jpegtran: $(TROBJECTS) libjpeg.a |
| 116 |
$(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) |
| 117 |
|
| 118 |
rdjpgcom: rdjpgcom.o |
| 119 |
$(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) |
| 120 |
|
| 121 |
wrjpgcom: wrjpgcom.o |
| 122 |
$(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) |
| 123 |
|
| 124 |
exe: cjpeg djpeg jpegtran rdjpgcom wrjpgcom |
| 125 |
coff2exe cjpeg |
| 126 |
coff2exe djpeg |
| 127 |
coff2exe jpegtran |
| 128 |
coff2exe rdjpgcom |
| 129 |
coff2exe wrjpgcom |
| 130 |
|
| 131 |
jconfig.h: jconfig.doc |
| 132 |
echo You must prepare a system-dependent jconfig.h file. |
| 133 |
echo Please read the installation directions in install.doc. |
| 134 |
exit 1 |
| 135 |
|
| 136 |
clean: |
| 137 |
$(RM) *.o |
| 138 |
$(RM) cjpeg |
| 139 |
$(RM) djpeg |
| 140 |
$(RM) jpegtran |
| 141 |
$(RM) rdjpgcom |
| 142 |
$(RM) wrjpgcom |
| 143 |
$(RM) libjpeg.a |
| 144 |
$(RM) testout*.* |
| 145 |
|
| 146 |
test: cjpeg djpeg jpegtran |
| 147 |
$(RM) testout*.* |
| 148 |
djpeg -dct int -ppm -outfile testout.ppm testorig.jpg |
| 149 |
djpeg -dct int -gif -outfile testout.gif testorig.jpg |
| 150 |
cjpeg -dct int -outfile testout.jpg testimg.ppm |
| 151 |
djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg |
| 152 |
cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm |
| 153 |
jpegtran -outfile testoutt.jpg testprog.jpg |
| 154 |
fc /b testimg.ppm testout.ppm |
| 155 |
# fc /b testimg.gif testout.gif |
| 156 |
fc /b testimg.jpg testout.jpg |
| 157 |
fc /b testimg.ppm testoutp.ppm |
| 158 |
fc /b testimgp.jpg testoutp.jpg |
| 159 |
fc /b testorig.jpg testoutt.jpg |
| 160 |
|
| 161 |
|
| 162 |
jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 163 |
jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 164 |
jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 165 |
jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 166 |
jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 167 |
jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h |
| 168 |
jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 169 |
jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 170 |
jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 171 |
jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 172 |
jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 173 |
jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 174 |
jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h |
| 175 |
jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 176 |
jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 177 |
jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 178 |
jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 179 |
jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 180 |
jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h |
| 181 |
jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h |
| 182 |
jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 183 |
jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 184 |
jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 185 |
jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h |
| 186 |
jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 187 |
jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 188 |
jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 189 |
jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 190 |
jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 191 |
jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h |
| 192 |
jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 193 |
jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 194 |
jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 195 |
jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h |
| 196 |
jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 197 |
jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 198 |
jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 199 |
jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 200 |
jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 201 |
jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 202 |
jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 203 |
jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 204 |
jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 205 |
jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 206 |
jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 207 |
jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 208 |
jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 209 |
jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 210 |
jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 211 |
jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 212 |
cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h |
| 213 |
djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h |
| 214 |
jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h |
| 215 |
cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 216 |
rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 217 |
rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 218 |
rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h |
| 219 |
wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h |
| 220 |
rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 221 |
wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 222 |
rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 223 |
wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 224 |
rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 225 |
wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 226 |
rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 227 |
wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 228 |
rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 229 |
wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |