home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / specific / mak / turboc < prev    next >
Encoding:
Text File  |  1991-10-26  |  6.9 KB  |  242 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/Turbo 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=masm
  58.  
  59. # Define the drive and directory for the Turbo C files.
  60. # COMPDIR contains the compiler and linker (normally \tc).
  61. # BGIDIR contains the BGI files (normally \tc).
  62. # INCDIR contains the include files (normally \tc\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 \tc\include (or whatever).
  66. # LIBDIR contains the library files (normally \tc\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:\tc
  71. BGIDIR=c:\tc
  72. INCDIR=c:\tc\include
  73. LIBDIR=c:\tc\lib
  74.  
  75. # Choose platform-specific options.
  76.  
  77. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  78. # (The 8086 and 8088 both correspond to processor type 86.)
  79. # 286 and up do not use protected mode.  Higher numbers produce
  80. # code that may be significantly smaller and faster, but the executable
  81. # will bail out with an error message on lower-numbered processor types.
  82.  
  83. CPU_TYPE=86
  84.  
  85. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  86. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  87. # CPU includes the equivalent of an 80387 on-chip.
  88. # A non-zero option means that the executable will only run if a FPU
  89. # of that type (or higher) is available: this is NOT currently checked
  90. # at runtime.
  91. #   Code is significantly faster.
  92.  
  93. FPU_TYPE=0
  94.  
  95. # ---------------------------- End of options ---------------------------- #
  96.  
  97. # Define the name of the makefile -- used in dependencies.
  98.  
  99. MAKEFILE=turboc.mak
  100.  
  101. # Define the extensions for the object and executable files.
  102.  
  103. OBJ=obj
  104. XE=.exe
  105.  
  106. # Define the ANSI-to-K&R dependency.  (Turbo C accepts ANSI syntax.)
  107.  
  108. AK=
  109.  
  110. # Define the need for uniq.
  111.  
  112. UNIQ=uniq$(XE)
  113.  
  114. # Define the directory separator and shell quote string.
  115. # The blank line in between is necessary, because MAKE interprets
  116. # the second \ as a line continuation character.
  117.  
  118. DS=\\
  119.  
  120. Q="
  121.  
  122. # Define the memory model for Turbo C.  Don't change it!
  123.  
  124. MM=l
  125.  
  126. # Define the compilation rules and flags
  127.  
  128. !if $(CPU_TYPE) >= 386
  129. ASMFLAGS=/DFOR80386
  130. PLATOPT=-1 -DFOR80386
  131. !elif $(CPU_TYPE) >= 186
  132. ASMFLAGS=
  133. PLATOPT=-1
  134. !else
  135. ASMFLAGS=
  136. PLATOPT=
  137. !endif
  138.  
  139. !if $(CPU_TYPE) == 486 || $(FPU_TYPE) >= 287
  140. FPFLAGS=-f287
  141. FPLIB=fp87
  142. !elif $(FPU_TYPE) != 0
  143. FPFLAGS=-f87
  144. FPLIB=fp87
  145. !else
  146. FPFLAGS=
  147. FPLIB=emu
  148. !endif
  149.  
  150. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  151. CC=$(COMPDIR)\tcc -d -r -y -G -K -N -I$(INCDIR) -I$(INC2DIR)
  152. CCC=$(CC) -a $(CCFLAGS) -O -c
  153. CC0=$(COMPDIR)\tcc -m$(MM) -c
  154. CCINT=$(CC) -a $(CCFLAGS) -c
  155.  
  156. .c.obj:
  157.     $(CCC) $<
  158.  
  159. .c.i:
  160.     $(COMPDIR)\cpp -I$(INCDIR) -I$(INC2DIR) -a $(CCFLAGS) -P- $<
  161.  
  162. .c.asm:
  163.     $(CC) $(CCFLAGS) -O -S $<
  164.  
  165. .asm.obj:
  166.     $(ASM) $(ASMFLAGS) $<;
  167.  
  168. # ------ Devices and features ------ #
  169.  
  170. # Choose the language feature(s) to include.  See ghost.mak for details.
  171.  
  172. FEATURES=
  173.  
  174. # Choose the device(s) to include.  See gdevs.mak for details.
  175.  
  176. DEVICES=vga ega bgi epson
  177. DEVICE_DEVS=vga.dev ega.dev bgi.dev epson.dev
  178. !include "ghost.mak"
  179. !include "gdevs.mak"
  180. DEVICE_OBJS=$(vga_) $(ega_) $(bgi_) $(epson_)
  181.  
  182. # -------------------------------- Library -------------------------------- #
  183.  
  184. # We have to compile gp_dos without -1, because it includes a run-time
  185. # check to make sure we are running on the right kind of processor.
  186. gp_dos.$(OBJ): gp_dos.c gp.h overlay.h $(MAKEFILE) makefile
  187.     $(CC) -a -m$(MM) $(GENOPT) -DCPU_TYPE=$(CPU_TYPE) -c gp_dos.c
  188.  
  189. # ------------------------------ Interpreter ------------------------------ #
  190.  
  191. iutilasm.$(OBJ): iutilasm.asm
  192.  
  193. # -------------------------- Auxiliary programs --------------------------- #
  194.  
  195. ansi2knr$(XE): ansi2knr.c
  196.     $(CC) $(CCFLAGS) -L$(LIBDIR) ansi2knr.c
  197.  
  198. genarch$(XE): genarch.c
  199.     $(CC) $(CCFLAGS) -L$(LIBDIR) genarch.c
  200.  
  201. # We need a substitute for the Unix uniq utility.
  202. # It only has to handle stdin and stdout, no options.
  203. uniq$(XE): uniq.c
  204.     $(CC) $(CCFLAGS) -L$(LIBDIR) uniq.c
  205.  
  206. # ----------------------------- Main program ------------------------------ #
  207.  
  208. # A rule to do a quick and dirty compilation attempt when first installing
  209. # Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  210.  
  211. begin:
  212.     erase arch.h
  213.     erase genarch.exe
  214.     make arch.h
  215.     - $(CCC) *.c
  216.     erase gp_dos.obj
  217.     erase gdevepsn.obj
  218.  
  219. # Get around the fact that the DOS shell has a rather small limit on
  220. # the length of a command line.  (sigh)
  221.  
  222. LIBCTR=libc$(MM).tr
  223.  
  224. $(LIBCTR): $(MAKEFILE) makefile
  225.     gssetmm $(LIBCTR) $(LIBDIR) $(FPLIB) math$(MM) c$(MM)
  226.  
  227. # Tracing package
  228.  
  229. # trace.c must be compiled without the -a switch!
  230. trace.obj: trace.c
  231.     $(CC) $(CCFLAGS) -O -c trace.c
  232.  
  233. LIBDOS=$(LIB) gp_dos.$(OBJ) gconfig.tr $(DEVICE_OBJS)
  234.  
  235. # Interpreter main program
  236.  
  237. GS_ALL=gs.$(OBJ) $(INT) iutilasm.$(OBJ) gsmain.$(OBJ) trace.$(OBJ)\
  238.   $(LIBDOS) $(LIBCTR) gconfig.tr
  239.  
  240. gs.exe: $(GS_ALL) $(INT)
  241.     tlink /m /l $(LIBDIR)\c0$(MM) @gconfig.tr @gs.tr ,gs,gs,$(LIBDIR)\graphics @$(LIBCTR)
  242.