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 / BCWIN.MAK < prev    next >
Text File  |  1992-09-15  |  7KB  |  250 lines

  1. #    Copyright (C) 1989, 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-Windows 3.n/Borland C++ 3.0 or 3.1 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. # 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. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  62. # and set ASM to the name of the assembler you are using.  This can be
  63. # a full path name if you want.  Normally it will be masm or tasm.
  64.  
  65. USE_ASM=1
  66. ASM=tasm
  67.  
  68. # Define the drive, directory, and compiler name for the Turbo C files.
  69. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  70. # COMPDIR contains the compiler and linker (normally \bc\bin).
  71. # INCDIR contains the include files (normally \bc\include).
  72. # LIBDIR contains the library files (normally \bc\lib).
  73. # Note that these prefixes are always followed by a \,
  74. #   so if you want to use the current directory, use an explicit '.'.
  75.  
  76. COMP=bcc
  77. COMPDIR=c:\bc\bin
  78. INCDIR=c:\bc\include
  79. LIBDIR=c:\bc\lib
  80.  
  81. # Windows 3.n requires a 286 CPU or higher.
  82.  
  83. CPU_TYPE=286
  84.  
  85. # Don't rely on FPU for Windows.
  86.  
  87. FPU_TYPE=0
  88.  
  89. # ---------------------------- End of options ---------------------------- #
  90.  
  91. # Swapping `make' out of memory makes linking much faster.
  92.  
  93. .swap
  94.  
  95. # Define the platform name.
  96.  
  97. PLATFORM=bcwin_
  98.  
  99. # Define the name of the makefile -- used in dependencies.
  100.  
  101. MAKEFILE=bcwin.mak
  102.  
  103. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  104. # but we need to preconstruct ccf.tr to get around the limit on
  105. # the maximum length of a command line.
  106.  
  107. AK=ccf.tr
  108.  
  109. # Define the compilation flags for an 80286.
  110. # This is void because we handle -2 and -3 in ccf.tr (see below).
  111.  
  112. F286=
  113.  
  114. # Figure out which version of Borland C++ we are running.
  115. # In the MAKE program that comes with Borland C++ 2.0, __MAKE__ is 0x300;
  116. # in the MAKE that comes with Borland C++ 3.0 and 3.1, it is 0x360.
  117. # We care because 3.0 has additional optimization features.
  118. # There are also some places below where we distinguish BC++ 3.1 from 3.0
  119. #   by testing whether $(INCDIR)\win30.h exists (true in 3.1, false in 3.0).
  120.  
  121. EXIST_BC3_1=exist $(INCDIR)\win30.h
  122.  
  123. !if $(__MAKE__) >= 0x360
  124. CO=-Obe -Z
  125. !else
  126. CO=-O
  127. !endif
  128.  
  129. !include "tccommon.mak"
  130.  
  131. # Define the compilation flags.
  132.  
  133. !if $(NOPRIVATE)
  134. CP=-DNOPRIVATE
  135. !else
  136. CP=
  137. !endif
  138.  
  139. !if $(DEBUG) | $(TDEBUG)
  140. CS=-N
  141. !else
  142. CS=
  143. !endif
  144.  
  145. !if $(DEBUG)
  146. CD=-DDEBUG
  147. !else
  148. CD=
  149. !endif
  150.  
  151. !if $(TDEBUG)
  152. CT=-v
  153. LCT=/v
  154. !else
  155. CT=-y
  156. LCT=/m /l
  157. !endif
  158.  
  159. GENOPT=$(CP) $(CS) $(CD) $(CT)
  160.  
  161. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  162. CC=$(COMPDIR)\$(COMP) @ccf.tr
  163. CCC=$(CC) -W $(CO) -c
  164. CCD=$(CC) -W -O -c
  165. CCCF=$(CC) $(GENOPT) $(PLATOPT) $(FPFLAGS) -mh
  166. CC0=$(CC) -W -c
  167. CCINT=$(CC) -W -c
  168.  
  169. .c.obj:
  170.     $(CCC) { $<}
  171.  
  172. # ------ Devices and features ------ #
  173.  
  174. # Choose the language feature(s) to include.  See gs.mak for details.
  175. # Since Ghostscript runs in enhanced mode, we include a fair number
  176. # of drivers, but we can't exceed 64K of static data.
  177.  
  178. FEATURE_DEVS=
  179.  
  180. # Choose the device(s) to include.  See devs.mak for details.
  181.  
  182. DEVICE_DEVS=mswin.dev epson.dev eps9high.dev bj10e.dev
  183. DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  184. DEVICE_DEVS3=cdeskjet.dev cdjcolor.dev cdjmono.dev paintjet.dev pjetxl.dev
  185. DEVICE_DEVS5=gifmono.dev gif8.dev bit.dev
  186. !include "gs.mak"
  187. !include "devs.mak"
  188.  
  189. # Build the compiler response file depending on the selected options.
  190.  
  191. ccf.tr: $(MAKEFILE) makefile
  192.     echo -2 -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS) -DCHECK_INTERRUPTS >ccf.tr
  193. !if $(CPU_TYPE) > 286
  194.     echo -3 -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS) -DCHECK_INTERRUPTS >_temp_
  195.     if $(EXIST_BC3_1) copy _temp_ ccf.tr
  196. !endif
  197.  
  198. # -------------------------------- Library -------------------------------- #
  199.  
  200. # The Turbo/Borland C(++), Microsoft Windows platform
  201.  
  202. bcwin__=gp_mswin.$(OBJ) gp_msdos.$(OBJ)
  203. bcwin_.dev: $(bcwin__)
  204.     $(SHP)gssetmod bcwin_ $(bcwin__)
  205.  
  206. gp_mswin.$(OBJ): gp_mswin.c gp_mswin.h $(memory__h) $(string__h)  \
  207.  $(gx_h) $(gp_h) $(gpcheck_h) $(gserrors_h) $(gxdevice_h)
  208.  
  209. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  210.  
  211. # ----------------------------- Main program ------------------------------ #
  212.  
  213. BEGINFILES=gs.res gs*.ico
  214. CCBEGIN=$(CCC) *.c
  215.  
  216. iutilasm.$(OBJ): iutilasm.asm
  217.  
  218. # Get around the fact that the DOS shell has a rather small limit on
  219. # the length of a command line.  (sigh)
  220.  
  221. LIBCTR=libc$(MM).tr
  222.  
  223. $(LIBCTR): $(MAKEFILE) makefile
  224.     echo $(LIBDIR)\import $(LIBDIR)\mathw$(MM) $(LIBDIR)\cw$(MM) >$(LIBCTR)
  225.  
  226. LIBDOS=$(LIB) obj.tr
  227.  
  228. # Interpreter main program
  229.  
  230. ICONS=gsgraph.ico gstext.ico
  231.  
  232. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\
  233.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr gs.res gs.def $(ICONS)
  234.  
  235. # Make the icons from their text form.
  236.  
  237. gsgraph.ico: gsgraph.icx echogs$(XE)
  238.     echogs -wb gsgraph.ico -n -X -r gsgraph.icx
  239.  
  240. gstext.ico: gstext.icx echogs$(XE)
  241.     echogs -wb gstext.ico -n -X -r gstext.icx
  242.  
  243. gs.res: gs.rc gp_mswin.h $(ICONS)
  244.     $(COMPDIR)\rc -i$(INCDIR) -r gs
  245.  
  246. gs.exe: $(GS_ALL)
  247.     tlink $(LCT) /Twe $(LIBDIR)\c0w$(MM) @obj.tr $(INTASM) @gs.tr ,gs,gs,@lib.tr @$(LIBCTR),gs.def
  248.     if $(EXIST_BC3_1) $(COMPDIR)\rc -30 -i$(INCDIR) gs
  249.     if not $(EXIST_BC3_1) $(COMPDIR)\rc -i$(INCDIR) gs
  250.