home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / specific / mak / tbcplus < prev    next >
Encoding:
Text File  |  1991-10-26  |  7.6 KB  |  269 lines

  1. #    Copyright (C) 1989, 1990, 1991 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/Borland C++ 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 \\ or / 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. # -DDEBUG
  42. #    includes debugging features (-Z switch) in the code.
  43. #      Code runs substantially slower even if no debugging switches
  44. #      are set.
  45. # -DNOPRIVATE
  46. #    makes private (static) procedures and variables public,
  47. #      so they are visible to the debugger and profiler.
  48. #      No execution time or space penalty, just larger .OBJ and .EXE files.
  49.  
  50. GENOPT= -DNOPRIVATE
  51.  
  52. # ------ Platform-specific options ------ #
  53.  
  54. # Define which assembler you are using.  This can be a full path name
  55. # if you want.  Normally it will be masm or tasm.
  56.  
  57. ASM=tasm
  58.  
  59. # Define the drive and directory for the Turbo C files.
  60. # COMPDIR contains the compiler and linker (normally \bc\bin).
  61. # BGIDIR contains the BGI files (normally \bc\bgi).
  62. # INCDIR contains the include files (normally \bc\include).
  63. # INC2DIR is an optional second include file directory,
  64. #   so that INCDIR can be a RAMdisk directory containing the most heavily
  65. #   used files and INC2DIR can be \bc\include (or whatever).
  66. # LIBDIR contains the library files (normally \bc\lib).
  67. # Note that these prefixes are always followed by a \,
  68. #   so if you want to use the current directory, use an explicit '.'.
  69.  
  70. COMPDIR=c:\bc\bin
  71. BGIDIR=c:\bc\bgi
  72. INCDIR=c:\bc\include
  73. LIBDIR=c:\bc\lib
  74.  
  75. # Define whether you want to use the Borland code overlay mechanism
  76. # (VROOMM).  Code overlays make it possible to process larger files,
  77. # but code swapping will slow Ghostscript down even on smaller ones.
  78. # See the file overlay.h to control details of overlaying such as
  79. # the overlay buffer size, whether to use EMS and/or extended memory
  80. # to store evicted overlays, and how much of that memory to use.
  81.  
  82. OVERLAY=1
  83.  
  84. # Choose platform-specific options.
  85.  
  86. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  87. # (The 8086 and 8088 both correspond to processor type 86.)
  88. # 286 and up do not use protected mode.  Higher numbers produce
  89. # code that may be significantly smaller and faster, but the executable
  90. # will bail out with an error message on lower-numbered processor types.
  91.  
  92. CPU_TYPE=86
  93.  
  94. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  95. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  96. # CPU includes the equivalent of an 80387 on-chip.
  97. # A non-zero option means that the executable will only run if a FPU
  98. # of that type (or higher) is available: this is NOT currently checked
  99. # at runtime.
  100. #   Code is significantly faster.
  101.  
  102. FPU_TYPE=0
  103.  
  104. # ---------------------------- End of options ---------------------------- #
  105.  
  106. # Define the name of the makefile -- used in dependencies.
  107.  
  108. MAKEFILE=tbcplus.mak
  109.  
  110. # Define the extensions for the object and executable files.
  111.  
  112. OBJ=obj
  113. XE=.exe
  114.  
  115. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  116. # but we need to preconstruct ccf.tr to get around the limit on
  117. # the maximum length of a command line.
  118.  
  119. AK=ccf.tr
  120.  
  121. # Define the need for uniq.
  122.  
  123. UNIQ=uniq$(XE)
  124.  
  125. # Define the directory separator and shell quote string.
  126. # The blank line in between is necessary, because MAKE interprets
  127. # the second \ as a line continuation character.
  128.  
  129. DS=\\
  130.  
  131. Q="
  132.  
  133. # Define the memory model for Turbo C.  Don't change it!
  134.  
  135. MM=l
  136.  
  137. # Define the compilation rules and flags
  138.  
  139. !if $(CPU_TYPE) >= 386
  140. ASMFLAGS=/DFOR80386
  141. PLATOPT=-1 -DFOR80386
  142. !elif $(CPU_TYPE) >= 186
  143. ASMFLAGS=
  144. PLATOPT=-1
  145. !else
  146. ASMFLAGS=
  147. PLATOPT=
  148. !endif
  149.  
  150. !if $(CPU_TYPE) == 486 || $(FPU_TYPE) >= 287
  151. FPFLAGS=-f287
  152. FPLIB=fp87
  153. !elif $(FPU_TYPE) != 0
  154. FPFLAGS=-f87
  155. FPLIB=fp87
  156. !else
  157. FPFLAGS=
  158. FPLIB=emu
  159. !endif
  160.  
  161. !if $(OVERLAY)
  162. CY=-Y
  163. CYO=-Yo -zAOVLY
  164. LO=/oOVLY
  165. LIBOVL=$(LIBDIR)\overlay
  166. OVLH=overlay.h
  167. !else
  168. CY=
  169. CYO=
  170. LO=
  171. LIBOVL=
  172. OVLH=
  173. !endif
  174.  
  175. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  176. CC=$(COMPDIR)\bcc @ccf.tr
  177. CCC=$(CC) $(CYO) -O -c
  178. CC0=$(CC) $(CYO) -c
  179. CCINT=$(CC) $(CYO) -c
  180.  
  181. .c.obj:
  182.     $(CCC) { $<}
  183.  
  184. .c.asm:
  185.     $(CC) $(CCFLAGS) $(CYO) -O -S $<
  186.  
  187. .asm.obj:
  188.     $(ASM) $(ASMFLAGS) $<;
  189.  
  190. # ------ Devices and features ------ #
  191.  
  192. # Choose the language feature(s) to include.  See ghost.mak for details.
  193.  
  194. FEATURES=
  195.  
  196. # Choose the device(s) to include.  See gdevs.mak for details.
  197.  
  198. DEVICES=vga ega bgi epson
  199. DEVICE_DEVS=vga.dev ega.dev bgi.dev epson.dev
  200. !include "ghost.mak"
  201. !include "gdevs.mak"
  202. DEVICE_OBJS=$(vga_) $(ega_) $(bgi_) $(epson_)
  203.  
  204. # Build the compiler response file depending on the selected options.
  205.  
  206. ccf.tr: $(MAKEFILE) makefile
  207.     echo -a -d -r -y -G -K -N -X -I$(INCDIR) -I$(INC2DIR) $(CCFLAGS) >ccf.tr
  208.  
  209. # -------------------------------- Library -------------------------------- #
  210.  
  211. # We have to compile gp_dos without -1, because it includes a run-time
  212. # check to make sure we are running on the right kind of processor.
  213. gp_dos.$(OBJ): gp_dos.c gp.h overlay.h $(MAKEFILE) makefile
  214.     $(CC) $(CCFLAGS) -1- $(CY) -DCPU_TYPE=$(CPU_TYPE) -c gp_dos.c
  215.  
  216. # ------------------------------ Interpreter ------------------------------ #
  217.  
  218. iutilasm.$(OBJ): iutilasm.asm
  219.  
  220. # -------------------------- Auxiliary programs --------------------------- #
  221.  
  222. ansi2knr$(XE):
  223.     $(CC) $(CCFLAGS) -L$(LIBDIR) ansi2knr.c
  224.  
  225. genarch$(XE): genarch.c
  226.     $(CC) $(CCFLAGS) -L$(LIBDIR) genarch.c
  227.  
  228. # We need a substitute for the Unix uniq utility.
  229. # It only has to handle stdin and stdout, no options.
  230. uniq$(XE): uniq.c
  231.     $(CC) $(CCFLAGS) -L$(LIBDIR) uniq.c
  232.  
  233. # ----------------------------- Main program ------------------------------ #
  234.  
  235. # A rule to do a quick and dirty compilation attempt when first installing
  236. # Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  237.  
  238. begin:
  239.     erase arch.h
  240.     erase genarch.exe
  241.     make arch.h
  242.     - $(CCC) *.c
  243.     erase gp_dos.obj
  244.     erase gdevepsn.obj
  245.  
  246. # Get around the fact that the DOS shell has a rather small limit on
  247. # the length of a command line.  (sigh)
  248.  
  249. LIBCTR=libc$(MM).tr
  250.  
  251. $(LIBCTR): $(MAKEFILE) makefile
  252.     echo $(LIBOVL) $(LIBDIR)\$(FPLIB) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) >$(LIBCTR)
  253.  
  254. # Tracing package
  255.  
  256. # trace.c must be compiled without the -a switch!
  257. trace.obj: trace.c
  258.     $(CC) $(CCFLAGS) $(CYO) -a- -O -c trace.c
  259.  
  260. LIBDOS=$(LIB) gp_dos.$(OBJ) gconfig.tr $(DEVICE_OBJS)
  261.  
  262. # Interpreter main program
  263.  
  264. GS_ALL=gs.$(OBJ) $(INT) iutilasm.$(OBJ) gsmain.$(OBJ) trace.$(OBJ)\
  265.   $(LIBDOS) $(LIBCTR) gconfig.tr
  266.  
  267. gs.exe: $(GS_ALL) $(INT)
  268.     tlink /m /l $(LO) $(LIBDIR)\c0$(MM) @gconfig.tr @gs.tr ,gs,gs,$(LIBDIR)\graphics @$(LIBCTR)
  269.