Home | History | Annotate | Download | only in jpeg
      1 # Makefile for Independent JPEG Group's software
      2 
      3 # This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using
      4 # dos4g extender), OS/2, and Windows NT console mode.
      5 # Thanks to Janos Haide, jhaide (a] btrvtech.com.
      6 
      7 # Read installation instructions before saying "wmake" !!
      8 
      9 # Uncomment line for desired system
     10 SYSTEM=DOS
     11 #SYSTEM=OS2
     12 #SYSTEM=NT
     13 
     14 # The name of your C compiler:
     15 CC= wcl386
     16 
     17 # You may need to adjust these cc options:
     18 CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM)
     19 # Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a.
     20 # Generally, we recommend defining any configuration symbols in jconfig.h,
     21 # NOT via -D switches here.
     22 
     23 # Link-time cc options:
     24 !ifeq SYSTEM DOS
     25 LDFLAGS= -zq -l=dos4g
     26 !else ifeq SYSTEM OS2
     27 LDFLAGS= -zq -l=os2v2
     28 !else ifeq SYSTEM NT
     29 LDFLAGS= -zq -l=nt
     30 !endif
     31 
     32 # Put here the object file name for the correct system-dependent memory
     33 # manager file.  jmemnobs should work fine for dos4g or OS/2 environment.
     34 SYSDEPMEM= jmemnobs.obj
     35 
     36 # End of configurable options.
     37 
     38 
     39 # source files: JPEG library proper
     40 LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c &
     41         jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c &
     42         jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c &
     43         jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c &
     44         jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c &
     45         jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c &
     46         jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c &
     47         jquant2.c jutils.c jmemmgr.c
     48 # memmgr back ends: compile only one of these into a working library
     49 SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
     50 # source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
     51 APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
     52         rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c &
     53         rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
     54 SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
     55 # files included by source files
     56 INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h &
     57         jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
     58 # documentation, test, and support files
     59 DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
     60         wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc &
     61         coderules.doc filelist.doc change.log
     62 MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc &
     63         makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds &
     64         makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st &
     65         maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms &
     66         makvms.opt
     67 CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
     68         jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
     69         jconfig.vms
     70 CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
     71 OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
     72 TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
     73         testimgp.jpg
     74 DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
     75         $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
     76 # library object files common to compression and decompression
     77 COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
     78 # compression library object files
     79 CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
     80         jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
     81         jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
     82         jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
     83 # decompression library object files
     84 DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
     85         jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
     86         jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
     87         jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
     88         jquant1.obj jquant2.obj jdmerge.obj
     89 # These objectfiles are included in libjpeg.lib
     90 LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
     91 # object files for sample applications (excluding library files)
     92 COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
     93         rdswitch.obj cdjpeg.obj
     94 DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
     95         rdcolmap.obj cdjpeg.obj
     96 TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
     97 
     98 
     99 all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
    100 
    101 libjpeg.lib: $(LIBOBJECTS)
    102 	- del libjpeg.lib
    103 	* wlib -n libjpeg.lib $(LIBOBJECTS)
    104 
    105 cjpeg.exe: $(COBJECTS) libjpeg.lib
    106 	$(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
    107 
    108 djpeg.exe: $(DOBJECTS) libjpeg.lib
    109 	$(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
    110 
    111 jpegtran.exe: $(TROBJECTS) libjpeg.lib
    112 	$(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
    113 
    114 rdjpgcom.exe: rdjpgcom.c
    115 	$(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
    116 
    117 wrjpgcom.exe: wrjpgcom.c
    118 	$(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
    119 
    120 .c.obj:
    121 	$(CC) $(CFLAGS) -c $<
    122 
    123 jconfig.h: jconfig.doc
    124 	echo You must prepare a system-dependent jconfig.h file.
    125 	echo Please read the installation directions in install.doc.
    126 	exit 1
    127 
    128 clean: .SYMBOLIC
    129 	- del *.obj
    130 	- del libjpeg.lib
    131 	- del cjpeg.exe
    132 	- del djpeg.exe
    133 	- del jpegtran.exe
    134 	- del rdjpgcom.exe
    135 	- del wrjpgcom.exe
    136 	- del testout*.*
    137 
    138 test: cjpeg.exe djpeg.exe jpegtran.exe  .SYMBOLIC
    139 	- del testout*.*
    140 	djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
    141 	djpeg -dct int -bmp -colors 256 -outfile testout.bmp  testorig.jpg
    142 	cjpeg -dct int -outfile testout.jpg  testimg.ppm
    143 	djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
    144 	cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
    145 	jpegtran -outfile testoutt.jpg testprog.jpg
    146 !ifeq SYSTEM DOS
    147 	fc /b testimg.ppm testout.ppm
    148 	fc /b testimg.bmp testout.bmp
    149 	fc /b testimg.jpg testout.jpg
    150 	fc /b testimg.ppm testoutp.ppm
    151 	fc /b testimgp.jpg testoutp.jpg
    152 	fc /b testorig.jpg testoutt.jpg
    153 !else
    154 	echo n > n.tmp
    155 	comp testimg.ppm testout.ppm < n.tmp
    156 	comp testimg.bmp testout.bmp < n.tmp
    157 	comp testimg.jpg testout.jpg < n.tmp
    158 	comp testimg.ppm testoutp.ppm < n.tmp
    159 	comp testimgp.jpg testoutp.jpg < n.tmp
    160 	comp testorig.jpg testoutt.jpg < n.tmp
    161 	del n.tmp
    162 !endif
    163 
    164 
    165 jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    166 jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    167 jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    168 jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    169 jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    170 jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
    171 jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    172 jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    173 jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    174 jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    175 jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    176 jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    177 jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
    178 jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    179 jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    180 jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    181 jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    182 jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    183 jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
    184 jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
    185 jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    186 jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    187 jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    188 jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
    189 jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    190 jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    191 jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    192 jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    193 jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    194 jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
    195 jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    196 jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    197 jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    198 jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
    199 jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    200 jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    201 jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    202 jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    203 jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    204 jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    205 jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
    206 jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    207 jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    208 jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
    209 jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
    210 jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
    211 jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
    212 jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
    213 jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
    214 jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
    215 cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
    216 djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
    217 jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
    218 rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
    219 wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
    220 cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    221 rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    222 rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    223 transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
    224 rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    225 wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    226 rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    227 wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    228 rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    229 wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    230 rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    231 wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    232 rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    233 wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
    234