Thomas G. Lane | 36a4ccc | 1994-09-24 00:00:00 +0000 | [diff] [blame^] | 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= d:/djgpp/bin/go32.exe |
| 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 |
| 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= del |
| 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= jcapi.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcmainct.c \ |
| 46 | jcmarker.c jcmaster.c jcomapi.c jcparam.c jcprepct.c jcsample.c \ |
| 47 | jdapi.c jdatasrc.c jdatadst.c jdcoefct.c jdcolor.c jddctmgr.c \ |
| 48 | jdhuff.c jdmainct.c jdmarker.c jdmaster.c jdpostct.c jdsample.c \ |
| 49 | jerror.c jutils.c jfdctfst.c jfdctflt.c jfdctint.c jidctfst.c \ |
| 50 | jidctflt.c jidctint.c jidctred.c jquant1.c jquant2.c jdmerge.c \ |
| 51 | jmemmgr.c jmemansi.c jmemname.c jmemnobs.c jmemdos.c |
| 52 | # source files: cjpeg/djpeg applications, also rdjpgcom/wrjpgcom |
| 53 | APPSOURCES= cjpeg.c djpeg.c rdcolmap.c rdppm.c wrppm.c rdgif.c wrgif.c \ |
| 54 | rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c rdjpgcom.c \ |
| 55 | wrjpgcom.c |
| 56 | SOURCES= $(LIBSOURCES) $(APPSOURCES) |
| 57 | # files included by source files |
| 58 | INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \ |
| 59 | jpeglib.h jversion.h cdjpeg.h cderror.h |
| 60 | # documentation, test, and support files |
| 61 | DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 rdjpgcom.1 wrjpgcom.1 \ |
| 62 | example.c libjpeg.doc structure.doc coderules.doc filelist.doc \ |
| 63 | change.log |
| 64 | MKFILES= configure makefile.auto makefile.ansi makefile.unix makefile.manx \ |
| 65 | makefile.sas makcjpeg.st makdjpeg.st makljpeg.st makefile.bcc \ |
| 66 | makefile.mc6 makefile.dj makefile.mms makefile.vms makvms.opt |
| 67 | CONFIGFILES= jconfig.auto jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ |
| 68 | jconfig.mc6 jconfig.dj jconfig.vms |
| 69 | OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm |
| 70 | TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg |
| 71 | DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ |
| 72 | $(OTHERFILES) $(TESTFILES) |
| 73 | # library object files common to compression and decompression |
| 74 | COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) |
| 75 | # compression library object files |
| 76 | CLIBOBJECTS= jcapi.o jcparam.o jdatadst.o jcmaster.o jcmarker.o jcmainct.o \ |
| 77 | jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o \ |
| 78 | jfdctfst.o jfdctflt.o jfdctint.o |
| 79 | # decompression library object files |
| 80 | DLIBOBJECTS= jdapi.o jdatasrc.o jdmaster.o jdmarker.o jdmainct.o jdcoefct.o \ |
| 81 | jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ |
| 82 | jdhuff.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o |
| 83 | # These objectfiles are included in libjpeg.a |
| 84 | LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) |
| 85 | # object files for cjpeg and djpeg applications (excluding library files) |
| 86 | COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o |
| 87 | DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o |
| 88 | |
| 89 | |
| 90 | all: libjpeg.a cjpeg djpeg rdjpgcom wrjpgcom |
| 91 | |
| 92 | libjpeg.a: $(LIBOBJECTS) |
| 93 | $(RM) libjpeg.a |
| 94 | $(AR) libjpeg.a $(LIBOBJECTS) |
| 95 | $(AR2) libjpeg.a |
| 96 | |
| 97 | cjpeg: $(COBJECTS) libjpeg.a |
| 98 | $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) |
| 99 | |
| 100 | djpeg: $(DOBJECTS) libjpeg.a |
| 101 | $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) |
| 102 | |
| 103 | rdjpgcom: rdjpgcom.o |
| 104 | $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) |
| 105 | |
| 106 | wrjpgcom: wrjpgcom.o |
| 107 | $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) |
| 108 | |
| 109 | exe: cjpeg djpeg rdjpgcom wrjpgcom |
| 110 | coff2exe cjpeg |
| 111 | coff2exe djpeg |
| 112 | coff2exe rdjpgcom |
| 113 | coff2exe wrjpgcom |
| 114 | |
| 115 | standalone: cjpeg djpeg rdjpgcom wrjpgcom |
| 116 | coff2exe -s $(GO32) cjpeg |
| 117 | coff2exe -s $(GO32) djpeg |
| 118 | coff2exe -s $(GO32) rdjpgcom |
| 119 | coff2exe -s $(GO32) wrjpgcom |
| 120 | |
| 121 | jconfig.h: jconfig.doc |
| 122 | echo You must prepare a system-dependent jconfig.h file. |
| 123 | echo Please read the installation directions in install.doc. |
| 124 | exit 1 |
| 125 | |
| 126 | clean: |
| 127 | $(RM) *.o |
| 128 | $(RM) cjpeg |
| 129 | $(RM) djpeg |
| 130 | $(RM) rdjpgcom |
| 131 | $(RM) wrjpgcom |
| 132 | $(RM) libjpeg.a |
| 133 | $(RM) testout.* |
| 134 | |
| 135 | test: cjpeg djpeg |
| 136 | $(RM) testout.* |
| 137 | go32 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg |
| 138 | go32 djpeg -dct int -gif -outfile testout.gif testorig.jpg |
| 139 | go32 cjpeg -dct int -outfile testout.jpg testimg.ppm |
| 140 | fc /b testimg.ppm testout.ppm |
| 141 | fc /b testimg.gif testout.gif |
| 142 | fc /b testimg.jpg testout.jpg |
| 143 | |
| 144 | |
| 145 | jcapi.o : jcapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 146 | jccoefct.o : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 147 | jccolor.o : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 148 | jcdctmgr.o : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 149 | jchuff.o : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 150 | jcmainct.o : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 151 | jcmarker.o : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 152 | jcmaster.o : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 153 | jcomapi.o : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 154 | jcparam.o : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 155 | jcprepct.o : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 156 | jcsample.o : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 157 | jdapi.o : jdapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 158 | jdatasrc.o : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h |
| 159 | jdatadst.o : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h |
| 160 | jdcoefct.o : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 161 | jdcolor.o : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 162 | jddctmgr.o : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 163 | jdhuff.o : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 164 | jdmainct.o : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 165 | jdmarker.o : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 166 | jdmaster.o : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 167 | jdpostct.o : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 168 | jdsample.o : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 169 | jerror.o : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h |
| 170 | jutils.o : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 171 | jfdctfst.o : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 172 | jfdctflt.o : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 173 | jfdctint.o : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 174 | jidctfst.o : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 175 | jidctflt.o : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 176 | jidctint.o : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 177 | jidctred.o : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h |
| 178 | jquant1.o : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 179 | jquant2.o : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 180 | jdmerge.o : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h |
| 181 | jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 182 | jmemansi.o : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 183 | jmemname.o : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 184 | jmemnobs.o : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 185 | jmemdos.o : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h |
| 186 | cjpeg.o : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h |
| 187 | djpeg.o : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h |
| 188 | rdcolmap.o : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 189 | rdppm.o : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 190 | wrppm.o : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 191 | rdgif.o : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 192 | wrgif.o : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 193 | rdtarga.o : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 194 | wrtarga.o : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 195 | rdbmp.o : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 196 | wrbmp.o : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 197 | rdrle.o : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 198 | wrrle.o : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h |
| 199 | rdjpgcom.o : rdjpgcom.c jinclude.h jconfig.h |
| 200 | wrjpgcom.o : wrjpgcom.c jinclude.h jconfig.h |