home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gs252src.zip / GS252 / WATC.MAK < prev    next >
Text File  |  1992-09-19  |  7KB  |  278 lines

  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. # and also enables stack checking.  Code is substantially slower and larger.
  49.  
  50. TDEBUG=0
  51.  
  52. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  53. # so they are visible to the debugger and profiler.
  54. # No execution time or space penalty, just larger .OBJ and .EXE files.
  55.  
  56. NOPRIVATE=0
  57.  
  58. # ------ Platform-specific options ------ #
  59.  
  60. # Define the drive, directory, and compiler name for the Watcom C files.
  61. # COMP is the full compiler path name (normally \watcom\bin\wcc386p).
  62. # LINK is the full linker path name (normally \watcom\bin\wlinkp).
  63. # CLINK is the compile-and-link utility full path name (normally
  64. #   \watcom\binb\wcl386).
  65. # STUB is the full path name for the DOS extender stub (normally
  66. #   \watcom\binb\wstub.exe).
  67. # INCDIR contains the include files (normally \watcom\h).
  68. # LIBDIR contains the library files (normally \watcom\lib386).
  69. # Note that INCDIR and LIBDIR are always followed by a \,
  70. #   so if you want to use the current directory, use an explicit '.'.
  71.  
  72. COMP=c:\watc\bin\wcc386p
  73. LINK=c:\watc\bin\wlinkp
  74. CLINK=c:\watc\binb\wcl386
  75. STUB=c:\watc\binb\wstub.exe
  76. INCDIR=c:\watc\h
  77. LIBDIR=c:\watc\lib386
  78.  
  79. # Choose platform-specific options.
  80.  
  81. # Define the processor (CPU) type.  Options are 386 or 486.
  82. # Currently the only difference is that 486 always uses in-line
  83. # floating point.
  84.  
  85. CPU_TYPE=386
  86.  
  87. # Define the math coprocessor (FPU) type.  Options are 0, 287, or 387.
  88. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  89. # CPU includes the equivalent of an 80387 on-chip.
  90. # A non-zero option means that the executable will only run if a FPU
  91. # of that type (or higher) is available: this is NOT currently checked
  92. # at runtime.
  93. #   Code is significantly faster.
  94.  
  95. FPU_TYPE=0
  96.  
  97. # ---------------------------- End of options ---------------------------- #
  98.  
  99. # We want Unix-compatible behavior.  This is part of it.
  100.  
  101. .NOCHECK
  102.  
  103. # Define additional extensions to keep `make' happy
  104.  
  105. .EXTENSIONS: .be .z
  106.  
  107. # Define the platform name.
  108.  
  109. PLATFORM=watc_
  110.  
  111. # Define the name of the makefile -- used in dependencies.
  112.  
  113. MAKEFILE=watc.mak
  114.  
  115. # Define the ANSI-to-K&R dependency.  Watcom C accepts ANSI syntax.
  116.  
  117. AK=
  118.  
  119. # Define the extensions for the object and executable files.
  120.  
  121. OBJ=obj
  122. XE=.exe
  123.  
  124. # Define the need for uniq.
  125.  
  126. UNIQ=uniq$(XE)
  127.  
  128. # Define the current directory prefix, shell quote string, and shell name.
  129.  
  130. EXPP=dos4gw
  131. QQ="
  132. SH=
  133. SHP=
  134.  
  135. # Define the generic compilation flags.
  136.  
  137. PLATOPT=-zq
  138.  
  139. !ifeq CPU_TYPE 486
  140. FPFLAGS=-fpi87
  141. !else
  142. !ifeq FPU_TYPE 387
  143. FPFLAGS=-fpi87
  144. !else
  145. !ifeq FPU_TYPE 287
  146. FPFLAGS=-fpi287
  147. !else
  148. FPFLAGS=
  149. !endif
  150. !endif
  151. !endif
  152.  
  153. INTASM=
  154. PCFBASM=
  155.  
  156. # Define the generic compilation rules.
  157.  
  158. .asm.obj:
  159.     $(ASM) $(ASMFLAGS) $<;
  160.  
  161. # Make sure we get the right default target for make.
  162.  
  163. dosdefault: gs$(XE)
  164.     %null
  165.  
  166. # -------------------------- Auxiliary programs --------------------------- #
  167.  
  168. echogs$(XE): echogs.c
  169.     echo OPTION STUB=$(STUB) >_temp_.tr
  170.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr echogs.c
  171.  
  172. genarch$(XE): genarch.c
  173.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c
  174.  
  175. # We need a substitute for the Unix uniq utility.
  176. # It only has to handle stdin and stdout, no options.
  177. uniq$(XE): uniq.c
  178.     echo OPTION STUB=$(STUB) >_temp_.tr
  179.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr uniq.c
  180.  
  181. # Define the compilation flags.
  182.  
  183. !ifneq NOPRIVATE 0
  184. CP=-dNOPRIVATE
  185. !else
  186. CP=
  187. !endif
  188.  
  189. !ifneq DEBUG 0
  190. CD=-dDEBUG
  191. !else
  192. CD=
  193. !endif
  194.  
  195. !ifneq TDEBUG 0
  196. CT=-d2
  197. LCT=DEBUG ALL
  198. !else
  199. CT=-d1
  200. LCT=DEBUG LINES
  201. !endif
  202.  
  203. !ifneq DEBUG 0
  204. CS=
  205. !else
  206. !  ifneq TDEBUG 0
  207. CS=
  208. !  else
  209. CS=-s
  210. !  endif
  211. !endif
  212.  
  213. GENOPT=$(CP) $(CD) $(CT) $(CS)
  214.  
  215. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  216. CC=$(COMP) -oi -i=$(INCDIR) $(CCFLAGS)
  217. CCL=$(CLINK) -p -oi -i=$(INCDIR) -l=dos4g
  218. CCC=$(CC)
  219. CCD=$(CC)
  220. CCCF=$(CC)
  221. CC0=$(CC)
  222. CCINT=$(COMP) -oit -i=$(INCDIR) $(CCFLAGS)
  223.  
  224. .c.obj:
  225.     $(CCC) $<
  226.  
  227. # ------ Devices and features ------ #
  228.  
  229. # Choose the language feature(s) to include.  See gs.mak for details.
  230. # Since we have a large address space, we include the optional features.
  231.  
  232. FEATURE_DEVS=filter.dev
  233.  
  234. # Choose the device(s) to include.  See devs.mak for details.
  235.  
  236. DEVICE_DEVS=vga.dev ega.dev tseng.dev epson.dev eps9high.dev bj10e.dev
  237. DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  238. DEVICE_DEVS3=cdeskjet.dev cdjcolor.dev cdjmono.dev paintjet.dev pjetxl.dev
  239. DEVICE_DEVS4=pbm.dev pbmraw.dev pgm.dev pgmraw.dev ppm.dev ppmraw.dev
  240. DEVICE_DEVS5=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev bit.dev
  241. !include gs.mak
  242. !include devs.mak
  243.  
  244. # -------------------------------- Library -------------------------------- #
  245.  
  246. # The Watcom C platform
  247.  
  248. watc__=gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  249. watc_.dev: $(watc__)
  250.     $(SHP)gssetmod watc_ $(watc__)
  251.  
  252. gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h)
  253.  
  254. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  255.  
  256. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  257.  
  258. # ----------------------------- Main program ------------------------------ #
  259.  
  260. BEGINFILES=ccf.tr
  261. # The Watcom compiler doesn't recognize wildcards;
  262. # we don't want any compilation to fail.
  263. CCBEGIN=for %%f in (gs*.c gx*.c z*.c) do $(CCC) %%f
  264.  
  265. LIBDOS=$(LIB) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) objw.tr lib.tr
  266.  
  267. # Interpreter main program
  268.  
  269. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) $(LIBDOS)
  270.  
  271. gs.exe: $(GS_ALL)
  272.     echo OPTION STUB=$(STUB) >_temp_.tr
  273.     echo OPTION STACK=8k >>_temp_.tr
  274.     echo LIBRARY $(LIBDIR)\math387r >>_temp_.tr
  275.     echo LIBRARY $(LIBDIR)\DOS\clib3r >>_temp_.tr
  276.     $(LINK) $(LCT) @gsw.tr @objw.tr @_temp_.tr
  277.     erase _temp_.tr
  278.