1 | # Makefile for Independent JPEG Group's software
|
---|
2 |
|
---|
3 | # This makefile is suitable for Borland C on MS-DOS or OS/2.
|
---|
4 | # It works with Borland C++ for DOS, revision 3.0 or later,
|
---|
5 | # and has been tested with Borland C++ for OS/2.
|
---|
6 | # Watch out for optimization bugs in the OS/2 compilers --- see notes below!
|
---|
7 | # Thanks to Tom Wright and Ge' Weijers (original DOS) and
|
---|
8 | # Ken Porter (OS/2) for this file.
|
---|
9 |
|
---|
10 | # Read installation instructions before saying "make" !!
|
---|
11 |
|
---|
12 | # Are we under DOS or OS/2?
|
---|
13 | !if !$d(DOS) && !$d(OS2)
|
---|
14 | !if $d(__OS2__)
|
---|
15 | OS2=1
|
---|
16 | !else
|
---|
17 | DOS=1
|
---|
18 | !endif
|
---|
19 | !endif
|
---|
20 |
|
---|
21 | # The name of your C compiler:
|
---|
22 | CC= bcc
|
---|
23 |
|
---|
24 | # You may need to adjust these cc options:
|
---|
25 | !if $d(DOS)
|
---|
26 | CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch
|
---|
27 | !else
|
---|
28 | CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch
|
---|
29 | !endif
|
---|
30 | # -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z).
|
---|
31 | # -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now.
|
---|
32 | # If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all.
|
---|
33 | # -mm selects medium memory model (near data, far code pointers; DOS only!)
|
---|
34 | # -w-par suppresses warnings about unused function parameters
|
---|
35 | # -w-stu suppresses warnings about incomplete structures
|
---|
36 | # -w-ccc suppresses warnings about compile-time-constant conditions
|
---|
37 | # -w-rch suppresses warnings about unreachable code
|
---|
38 | # Generally, we recommend defining any configuration symbols in jconfig.h,
|
---|
39 | # NOT via -D switches here.
|
---|
40 |
|
---|
41 | # Link-time cc options:
|
---|
42 | !if $d(DOS)
|
---|
43 | LDFLAGS= -mm
|
---|
44 | # memory model option here must match CFLAGS!
|
---|
45 | !else
|
---|
46 | LDFLAGS=
|
---|
47 | # -lai full-screen app
|
---|
48 | # -lc case-significant link
|
---|
49 | !endif
|
---|
50 |
|
---|
51 | # Put here the object file name for the correct system-dependent memory
|
---|
52 | # manager file.
|
---|
53 | # For DOS, we recommend jmemdos.c and jmemdosa.asm.
|
---|
54 | # For OS/2, we recommend jmemnobs.c (flat memory!)
|
---|
55 | # SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
|
---|
56 | !if $d(DOS)
|
---|
57 | SYSDEPMEM= jmemdos.obj jmemdosa.obj
|
---|
58 | SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
|
---|
59 | !else
|
---|
60 | SYSDEPMEM= jmemnobs.obj
|
---|
61 | SYSDEPMEMLIB= +jmemnobs.obj
|
---|
62 | !endif
|
---|
63 |
|
---|
64 | # End of configurable options.
|
---|
65 |
|
---|
66 |
|
---|
67 | # source files: JPEG library proper
|
---|
68 | LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
|
---|
69 | jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
|
---|
70 | jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
|
---|
71 | jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
|
---|
72 | jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
|
---|
73 | jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
|
---|
74 | jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
|
---|
75 | jquant2.c jutils.c jmemmgr.c
|
---|
76 | # memmgr back ends: compile only one of these into a working library
|
---|
77 | SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
|
---|
78 | # source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
|
---|
79 | APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
|
---|
80 | rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
|
---|
81 | rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
|
---|
82 | SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
|
---|
83 | # files included by source files
|
---|
84 | INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
|
---|
85 | jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
|
---|
86 | # documentation, test, and support files
|
---|
87 | DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
|
---|
88 | wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
|
---|
89 | coderules.doc filelist.doc change.log
|
---|
90 | MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
|
---|
91 | makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
|
---|
92 | makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
|
---|
93 | maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
|
---|
94 | makvms.opt
|
---|
95 | CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
|
---|
96 | jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
|
---|
97 | jconfig.vms
|
---|
98 | CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
|
---|
99 | OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
|
---|
100 | TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
|
---|
101 | testimgp.jpg
|
---|
102 | DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
|
---|
103 | $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
|
---|
104 | # library object files common to compression and decompression
|
---|
105 | COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
|
---|
106 | # compression library object files
|
---|
107 | CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
|
---|
108 | jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
|
---|
109 | jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
|
---|
110 | jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
|
---|
111 | # decompression library object files
|
---|
112 | DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
|
---|
113 | jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
|
---|
114 | jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
|
---|
115 | jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
|
---|
116 | jquant1.obj jquant2.obj jdmerge.obj
|
---|
117 | # These objectfiles are included in libjpeg.lib
|
---|
118 | LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
|
---|
119 | # object files for sample applications (excluding library files)
|
---|
120 | COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
|
---|
121 | rdswitch.obj cdjpeg.obj
|
---|
122 | DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
|
---|
123 | rdcolmap.obj cdjpeg.obj
|
---|
124 | TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
|
---|
125 |
|
---|
126 |
|
---|
127 | all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
|
---|
128 |
|
---|
129 | libjpeg.lib: $(LIBOBJECTS)
|
---|
130 | - del libjpeg.lib
|
---|
131 | tlib libjpeg.lib /E /C @&&|
|
---|
132 | +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj &
|
---|
133 | +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj &
|
---|
134 | +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj &
|
---|
135 | +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
|
---|
|
---|