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 / TBCPLUS.MAK < prev    next >
Text File  |  1992-09-19  |  9KB  |  285 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 / 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 Borland 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. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  61. # and set ASM to the name of the assembler you are using.  This can be
  62. # a full path name if you want.  Normally it will be masm or tasm.
  63.  
  64. USE_ASM=1
  65. ASM=tasm
  66.  
  67. # Define the drive, directory, and compiler name for the Turbo C files.
  68. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  69. # COMPDIR contains the compiler and linker (normally \bc\bin).
  70. # BGIDIR contains the BGI files (normally /bc/bgi).
  71. #   (These are only needed if you include the BGI driver.)
  72. # INCDIR contains the include files (normally \bc\include).
  73. # LIBDIR contains the library files (normally \bc\lib).
  74. # Note that these prefixes are always followed by a \,
  75. #   so if you want to use the current directory, use an explicit '.'.
  76.  
  77. COMP=bcc
  78. COMPDIR=c:\bc\bin
  79. # For BGIDIR, use / to indicate directories, not \.
  80. BGIDIR=c:/bc/bgi
  81. INCDIR=c:\bc\include
  82. LIBDIR=c:\bc\lib
  83.  
  84. # Define whether you want to use the Borland code overlay mechanism
  85. # (VROOMM).  Code overlays make it possible to process larger files,
  86. # but code swapping will slow Ghostscript down even on smaller ones.
  87. # See the file overlay.h to control details of overlaying such as
  88. # the overlay buffer size, whether to use EMS and/or extended memory
  89. # to store evicted overlays, and how much of that memory to use.
  90.  
  91. OVERLAY=1
  92.  
  93. # Choose platform-specific options.
  94.  
  95. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  96. # (The 8086 and 8088 both correspond to processor type 86.)
  97. # 286 and up do not use protected mode.  Higher numbers produce
  98. # code that may be significantly smaller and faster, but the executable
  99. # will bail out with an error message on lower-numbered processor types.
  100.  
  101. CPU_TYPE=86
  102.  
  103. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  104. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  105. # CPU includes the equivalent of an 80387 on-chip.
  106. # A non-zero option means that the executable will only run if a FPU
  107. # of that type (or higher) is available: this is NOT currently checked
  108. # at runtime.
  109. #   Code is significantly faster.
  110.  
  111. FPU_TYPE=0
  112.  
  113. # ---------------------------- End of options ---------------------------- #
  114.  
  115. # Swapping `make' out of memory makes linking much faster.
  116.  
  117. .swap
  118.  
  119. # Define the platform name.
  120.  
  121. PLATFORM=tbc_
  122.  
  123. # Define the name of the makefile -- used in dependencies.
  124.  
  125. MAKEFILE=tbcplus.mak
  126.  
  127. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  128. # but we need to preconstruct ccf.tr to get around the limit on
  129. # the maximum length of a command line.
  130.  
  131. AK=ccf.tr
  132.  
  133. # Define the compilation flags for an 80286.
  134. # This is void because we handle -2 and -3 in ccf.tr (see below).
  135.  
  136. F286=
  137.  
  138. # Figure out which version of Borland C++ we are running.
  139. # In the MAKE program that comes with Borland C++ 2.0, __MAKE__ is 0x300;
  140. # in the MAKE that comes with Borland C++ 3.0 and 3.1, it is 0x360.
  141. # We care because 3.0 has additional optimization features.
  142. # There are also some places below where we distinguish BC++ 3.1 from 3.0
  143. #   by testing whether $(INCDIR)\win30.h exists (true in 3.1, false in 3.0).
  144.  
  145. EXIST_BC3_1=exist $(INCDIR)\win30.h
  146.  
  147. !if $(__MAKE__) >= 0x360
  148. CO=-Obe -Z
  149. !else
  150. CO=-O
  151. !endif
  152.  
  153. !include "tccommon.mak"
  154.  
  155. # Define the compilation flags.
  156.  
  157. !if $(NOPRIVATE)
  158. CP=-DNOPRIVATE
  159. !else
  160. CP=
  161. !endif
  162.  
  163. !if $(DEBUG) | $(TDEBUG)
  164. CS=-N
  165. !else
  166. CS=
  167. !endif
  168.  
  169. !if $(DEBUG)
  170. CD=-DDEBUG
  171. !else
  172. CD=
  173. !endif
  174.  
  175. !if $(TDEBUG)
  176. CT=-v
  177. LCT=/v
  178. !else
  179. CT=-y
  180. LCT=/m /l
  181. !endif
  182.  
  183. GENOPT=$(CP) $(CS) $(CD) $(CT)
  184.  
  185. !if $(OVERLAY)
  186. CY=-Y
  187. CYO=-Yo -zAOVLY
  188. LO=/oOVLY
  189. LIBOVL=$(LIBDIR)\overlay
  190. OVLH=overlay.h
  191. !else
  192. CY=
  193. CYO=
  194. LO=
  195. LIBOVL=
  196. OVLH=
  197. !endif
  198.  
  199. CCFLAGS0=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  200. CCFLAGS=$(CCFLAGS0) -m$(MM)
  201. CC=$(COMPDIR)\$(COMP) -m$(MM) @ccf.tr
  202. CCC=$(CC) $(CYO) $(CO) -c
  203. CCD=$(CC) $(CYO) -O -c
  204. CCCF=$(COMPDIR)\$(COMP) -mh @ccf.tr $(CYO) -O -c
  205. CC0=$(CC) $(CYO) -c
  206. CCINT=$(CC) $(CYO) -c
  207.  
  208. .c.obj:
  209.     $(CCC) { $<}
  210.  
  211. # ------ Devices and features ------ #
  212.  
  213. # Choose the language feature(s) to include.  See gs.mak for details.
  214. # Even though code overlays are available, we don't include any of the
  215. # optional features, because they cost a significant amount of non-code space.
  216.  
  217. FEATURE_DEVS=
  218.  
  219. # Choose the device(s) to include.  See devs.mak for details.
  220. # We don't include the BGI driver, because it takes 10K of
  221. # non-overlayable code space.
  222.  
  223. DEVICE_DEVS=vga.dev ega.dev epson.dev eps9high.dev bj10e.dev
  224. DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  225. DEVICE_DEVS3=cdeskjet.dev cdjcolor.dev cdjmono.dev paintjet.dev pjetxl.dev
  226. DEVICE_DEVS5=gifmono.dev gif8.dev
  227. !include "gs.mak"
  228. !include "devs.mak"
  229.  
  230. # Build the compiler response file depending on the selected options.
  231.  
  232. ccf.tr: $(MAKEFILE) makefile
  233. !if $(CPU_TYPE) < 286
  234.     echo -a -d -r -G -X -I$(INCDIR) $(CCFLAGS0) >ccf.tr
  235. !else
  236.     echo -2 -a -d -r -G -X -I$(INCDIR) $(CCFLAGS0) >ccf.tr
  237. !  if $(CPU_TYPE) > 286
  238.     echo -3 -a -d -r -G -X -I$(INCDIR) $(CCFLAGS0) >_temp_
  239.     if $(EXIST_BC3_1) copy _temp_ ccf.tr
  240. !  endif
  241. !endif
  242.  
  243. # -------------------------------- Library -------------------------------- #
  244.  
  245. # The Turbo/Borland C(++) platform
  246.  
  247. tbc__=gp_itbc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  248. tbc_.dev: $(tbc__)
  249.     $(SHP)gssetmod tbc_ $(tbc__)
  250.  
  251. # We have to compile gp_itbc without -1, because it includes a run-time
  252. # check to make sure we are running on the right kind of processor.
  253. gp_itbc.$(OBJ): gp_itbc.c $(string__h) $(gx_h) $(gp_h) \
  254.  $(OVLH) $(MAKEFILE) makefile
  255.     $(CC) $(CCFLAGS) -1- $(CY) -DCPU_TYPE=$(CPU_TYPE) -c gp_itbc.c
  256.  
  257. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  258.  
  259. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  260.  
  261. # ----------------------------- Main program ------------------------------ #
  262.  
  263. BEGINFILES=ccf.tr
  264. CCBEGIN=$(CCC) *.c
  265.  
  266. iutilasm.$(OBJ): iutilasm.asm
  267.  
  268. # Get around the fact that the DOS shell has a rather small limit on
  269. # the length of a command line.  (sigh)
  270.  
  271. LIBCTR=libc$(MM).tr
  272.  
  273. $(LIBCTR): $(MAKEFILE) makefile
  274.     echo $(LIBOVL) $(LIBDIR)\$(FPLIB) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) >$(LIBCTR)
  275.  
  276. LIBDOS=$(LIB) obj.tr
  277.  
  278. # Interpreter main program
  279.  
  280. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\
  281.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr
  282.  
  283. gs.exe: $(GS_ALL)
  284.     tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @obj.tr $(INTASM) @gs.tr ,gs,gs,@lib.tr @$(LIBCTR)
  285.