Commit | Line | Data |
---|---|---|
e7b0a394 WJ |
1 | # Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. |
2 | # Distributed by Free Software Foundation, Inc. | |
3 | # | |
4 | # This file is part of Ghostscript. | |
5 | # | |
6 | # Ghostscript is distributed in the hope that it will be useful, but | |
7 | # WITHOUT ANY WARRANTY. No author or distributor accepts responsibility | |
8 | # to anyone for the consequences of using it or for whether it serves any | |
9 | # particular purpose or works at all, unless he says so in writing. Refer | |
10 | # to the Ghostscript General Public License for full details. | |
11 | # | |
12 | # Everyone is granted permission to copy, modify and redistribute | |
13 | # Ghostscript, but only under the conditions described in the Ghostscript | |
14 | # General Public License. A copy of this license is supposed to have been | |
15 | # given to you along with Ghostscript so you can know your rights and | |
16 | # responsibilities. It should be in a file named COPYING. Among other | |
17 | # things, the copyright notice and this notice must be preserved on all | |
18 | # copies. | |
19 | ||
20 | # makefile for Ghostscript, MS-DOS/Watcom C386 platform. | |
21 | ||
22 | # ------------------------------- Options ------------------------------- # | |
23 | ||
24 | ###### This section is the only part of the file you should need to edit. | |
25 | ||
26 | # ------ Generic options ------ # | |
27 | ||
28 | # Define the default directory/ies for the runtime | |
29 | # initialization and font files. Separate multiple directories with \;. | |
30 | # Use / to indicate directories, not a single \. | |
31 | ||
32 | GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts | |
33 | ||
34 | # Define the name of the Ghostscript initialization file. | |
35 | # (There is no reason to change this.) | |
36 | ||
37 | GS_INIT=gs_init.ps | |
38 | ||
39 | # Choose generic configuration options. | |
40 | ||
41 | # Setting DEBUG=1 includes debugging features (-Z switch) in the code. | |
42 | # Code runs substantially slower even if no debugging switches are set, | |
43 | # and also takes about another 25K of memory. | |
44 | ||
45 | DEBUG=0 | |
46 | ||
47 | # Setting TDEBUG=1 includes symbol table information for the Watcom debugger. | |
48 | # No execution time or space penalty, just larger .OBJ and .EXE files | |
49 | # and slower linking. | |
50 | ||
51 | TDEBUG=0 | |
52 | ||
53 | # Setting NOPRIVATE=1 makes private (static) procedures and variables public, | |
54 | # so they are visible to the debugger and profiler. | |
55 | # No execution time or space penalty, just larger .OBJ and .EXE files. | |
56 | ||
57 | NOPRIVATE=0 | |
58 | ||
59 | # ------ Platform-specific options ------ # | |
60 | ||
61 | # Define the drive, directory, and compiler name for the Watcom C files. | |
62 | # COMP is the full compiler path name (normally \watcom\bin\wcc386p). | |
63 | # LINK is the full linker path name (normally \watcom\bin\wlinkp). | |
64 | # CLINK is the compile-and-link utility full path name (normally | |
65 | # \watcom\binb\wcl386). | |
66 | # STUB is the full path name for the DOS extender stub (normally | |
67 | # \watcom\binb\wstub.exe). | |
68 | # INCDIR contains the include files (normally \watcom\h). | |
69 | # LIBDIR contains the library files (normally \watcom\lib386). | |
70 | # Note that INCDIR and LIBDIR are always followed by a \, | |
71 | # so if you want to use the current directory, use an explicit '.'. | |
72 | ||
73 | COMP=c:\watc\bin\wcc386p | |
74 | LINK=c:\watc\bin\wlinkp | |
75 | CLINK=c:\watc\binb\wcl386 | |
76 | STUB=c:\watc\binb\wstub.exe | |
77 | INCDIR=c:\watc\h | |
78 | LIBDIR=c:\watc\lib386 | |
79 | ||
80 | # Choose platform-specific options. | |
81 | ||
82 | # Define the processor (CPU) type. Options are 386 or 486. | |
83 | # Currently the only difference is that 486 always uses in-line | |
84 | # floating point. | |
85 | ||
86 | CPU_TYPE=386 | |
87 | ||
88 | # Define the math coprocessor (FPU) type. Options are 0, 287, or 387. | |
89 | # If the CPU type is 486, the FPU type is irrelevant, since the 80486 | |
90 | # CPU includes the equivalent of an 80387 on-chip. | |
91 | # A non-zero option means that the executable will only run if a FPU | |
92 | # of that type (or higher) is available: this is NOT currently checked | |
93 | # at runtime. | |
94 | # Code is significantly faster. | |
95 | ||
96 | FPU_TYPE=0 | |
97 | ||
98 | # ---------------------------- End of options ---------------------------- # | |
99 | ||
100 | # We want Unix-compatible behavior. This is part of it. | |
101 | ||
102 | .NOCHECK | |
103 | ||
104 | # Define additional extensions to keep `make' happy | |
105 | ||
106 | .EXTENSIONS: .be .z | |
107 | ||
108 | # Define the platform name. | |
109 | ||
110 | PLATFORM=watc_ | |
111 | ||
112 | # Define the name of the makefile -- used in dependencies. | |
113 | ||
114 | MAKEFILE=watc.mak | |
115 | ||
116 | # Define the ANSI-to-K&R dependency. Watcom C accepts ANSI syntax. | |
117 | ||
118 | AK= | |
119 | ||
120 | # Define the extensions for the object and executable files. | |
121 | ||
122 | OBJ=obj | |
123 | XE=.exe | |
124 | ||
125 | # Define the need for uniq. | |
126 | ||
127 | UNIQ=uniq$(XE) | |
128 | ||
129 | # Define the current directory prefix, shell quote string, and shell name. | |
130 | ||
131 | EXPP=dos4gw | |
132 | QQ=" | |
133 | SH= | |
134 | SHP= | |
135 | ||
136 | # Define the generic compilation flags. | |
137 | ||
138 | PLATOPT= | |
139 | ||
140 | !ifeq CPU_TYPE 486 | |
141 | FPFLAGS=-fpi87 | |
142 | !else | |
143 | !ifeq FPU_TYPE 387 | |
144 | FPFLAGS=-fpi87 | |
145 | !else | |
146 | !ifeq FPU_TYPE 287 | |
147 | FPFLAGS=-fpi287 | |
148 | !else | |
149 | FPFLAGS= | |
150 | !endif | |
151 | !endif | |
152 | !endif | |
153 | ||
154 | INTASM= | |
155 | PCFBASM= | |
156 | ||
157 | # Define the generic compilation rules. | |
158 | ||
159 | .asm.obj: | |
160 | $(ASM) $(ASMFLAGS) $<; | |
161 | ||
162 | # Make sure we get the right default target for make. | |
163 | ||
164 | dosdefault: gs$(XE) | |
165 | %null | |
166 | ||
167 | # -------------------------- Auxiliary programs --------------------------- # | |
168 | ||
169 | genarch$(XE): genarch.c | |
170 | $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c | |
171 | ||
172 | # We need a substitute for the Unix uniq utility. | |
173 | # It only has to handle stdin and stdout, no options. | |
174 | uniq$(XE): uniq.c | |
175 | echo OPTION STUB=$(STUB) >_temp_.tr | |
176 | $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr uniq.c | |
177 | ||
178 | # Define the compilation flags. | |
179 | ||
180 | !ifneq NOPRIVATE 0 | |
181 | CP=-dNOPRIVATE | |
182 | !else | |
183 | CP= | |
184 | !endif | |
185 | ||
186 | !ifneq DEBUG 0 | |
187 | CD=-dDEBUG | |
188 | !else | |
189 | CD= | |
190 | !endif | |
191 | ||
192 | !ifneq TDEBUG 0 | |
193 | CT=-d2 | |
194 | LCT=DEBUG ALL | |
195 | !else | |
196 | CT=-d1 | |
197 | LCT=DEBUG LINES | |
198 | !endif | |
199 | ||
200 | GENOPT=$(CP) $(CD) $(CT) | |
201 | ||
202 | CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) | |
203 | CC=$(COMP) -oi -i=$(INCDIR) $(CCFLAGS) | |
204 | CCL=$(CLINK) -p -oi -i=$(INCDIR) -l=dos4g | |
205 | CCC=$(CC) | |
206 | CC0=$(CC) | |
207 | CCINT=$(CC) | |
208 | ||
209 | .c.obj: | |
210 | $(CCC) $< | |
211 | ||
212 | # ------ Devices and features ------ # | |
213 | ||
214 | # Choose the language feature(s) to include. See gs.mak for details. | |
215 | # Since we have a large address space, we include the optional features. | |
216 | ||
217 | FEATURE_DEVS=filter.dev dps.dev level2.dev | |
218 | ||
219 | # Choose the device(s) to include. See devs.mak for details. | |
220 | ||
221 | DEVICE_DEVS=vga.dev ega.dev tseng.dev epson.dev bj10e.dev paintjet.dev | |
222 | DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev | |
223 | DEVICE_DEVS3=pbm.dev pbmraw.dev pgm.dev pgmraw.dev ppm.dev ppmraw.dev | |
224 | DEVICE_DEVS4=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev | |
225 | !include gs.mak | |
226 | !include devs.mak | |
227 | ||
228 | # -------------------------------- Library -------------------------------- # | |
229 | ||
230 | # The Watcom C platform | |
231 | ||
232 | watc__=gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) | |
233 | watc_.dev: $(watc__) | |
234 | $(SHP)gssetmod watc_ $(watc__) | |
235 | ||
236 | gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h) | |
237 | ||
238 | gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h) | |
239 | ||
240 | gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h) | |
241 | ||
242 | # ----------------------------- Main program ------------------------------ # | |
243 | ||
244 | # A rule to do a quick and dirty compilation attempt when first installing | |
245 | # Ghostscript. Many of the compilations will fail: follow this with 'make'. | |
246 | ||
247 | begin: | |
248 | erase ccf.tr | |
249 | erase arch.h | |
250 | erase genarch.exe | |
251 | make arch.h | |
252 | - $(CCC) *.c | |
253 | erase gp_*.obj | |
254 | erase gdevepsn.obj | |
255 | ||
256 | LIBDOS=$(LIB) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) objw.tr lib.tr | |
257 | ||
258 | # Interpreter main program | |
259 | ||
260 | GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) $(LIBDOS) | |
261 | ||
262 | gs.exe: $(GS_ALL) | |
263 | echo OPTION STUB=$(STUB) >_temp_.tr | |
264 | echo LIBRARY $(LIBDIR)\math387r >>_temp_.tr | |
265 | echo LIBRARY $(LIBDIR)\DOS\clib3r >>_temp_.tr | |
266 | $(LINK) $(LCT) @gsw.tr @objw.tr @_temp_.tr | |
267 | erase _temp_.tr |