home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / g / gs241j11.zip / DJGPP.MAK next >
Makefile  |  1992-05-15  |  5KB  |  190 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-DOS 5.0/DJ's GCC configuration.
  21. # Note: this makefile assumes you are using gcc in ANSI mode.
  22.  
  23. # ------------------------------- Options ------------------------------- #
  24.  
  25. ####### The following are the only parts of the file you should need to edit.
  26.  
  27. # ------ Generic options ------ #
  28.  
  29. # Define the default directory/ies for the runtime
  30. # initialization and font files.  Separate multiple directories with ;.
  31. # Use / to indicate directories, not a single \.
  32.  
  33. GS_LIB_DEFAULT=c:/gs;c:/gs/fonts
  34.  
  35. # Define the name of the Ghostscript initialization file.
  36. # (There is no reason to change this.)
  37.  
  38. GS_INIT=gs_init.ps
  39.  
  40. # Choose generic configuration options.
  41.  
  42. # -DDEBUG
  43. #    includes debugging features (-Z switch) in the code.
  44. #      Code runs substantially slower even if no debugging switches
  45. #      are set.
  46. # -DNOPRIVATE
  47. #    makes private (static) procedures and variables public,
  48. #      so they are visible to the debugger and profiler.
  49. #      No execution time or space penalty.
  50.  
  51. GENOPT=
  52.  
  53. # ------ Platform-specific options ------ #
  54.  
  55. # Define the name of the C compiler.
  56.  
  57. CC=gcc
  58.  
  59. # XCFLAGS can be set from the command line.
  60. # We don't include -ansi, because this gets in the way of the platform-
  61. #   specific stuff that <math.h> typically needs; nevertheless, we expect
  62. #   gcc to accept ANSI-style function prototypes and function definitions.
  63.  
  64. CFLAGS=-g -O $(XCFLAGS) -DCOMPFONT -DWMODE -DKANJI
  65.  
  66. # Define platform flags for ld.
  67. # XLDFLAGS can be set from the command line.
  68.  
  69. LDFLAGS=$(XLDFLAGS)
  70.  
  71. # Define any extra libraries to link into the executable.
  72. # (Libraries required by individual drivers are handled automatically.)
  73.  
  74. EXTRALIBS=
  75.  
  76. # ------ Devices and features ------ #
  77.  
  78. # Choose the language feature(s) to include.  See gs.mak for details.
  79.  
  80. FEATURE_DEVS=filter.dev dps.dev level2.dev compfont.dev kanji.dev \
  81.          kfpc98.dev kfzeit.dev
  82.  
  83. # Choose the device(s) to include.  See devs.mak for details.
  84.  
  85. DEVICE_DEVS=
  86.  
  87. # ---------------------------- End of options --------------------------- #
  88.  
  89. # Define the name of the makefile -- used in dependencies.
  90.  
  91. MAKEFILE=djgpp.mak
  92.  
  93. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  94. # but we need to preconstruct ccf.tr to get around the limit on
  95. # the maximum length of a command line.
  96.  
  97. AK=ccf.tr
  98.  
  99. # Define the compilation rules and flags.
  100.  
  101. CCFLAGS=$(GENOPT) $(CFLAGS)
  102.  
  103. CCC=$(CC) @ccf.tr -c
  104.  
  105. # ----------------------------- Generic stuff ----------------------------- #
  106.  
  107. # Define the platform name.
  108.  
  109. PLATFORM=djgpp_
  110.  
  111. # Define the extensions for the object and executable files.
  112.  
  113. OBJ=o
  114. XE=.exe
  115.  
  116. # Define the need for uniq.
  117.  
  118. UNIQ=uniq$(XE)
  119.  
  120. # Define the current directory prefix, shell quote string, and shell names.
  121.  
  122. EXP=
  123. QQ=\"
  124. SHELL=
  125. SH=
  126. SHP=
  127.  
  128. # Define the compilation rules and flags.
  129.  
  130. .c.o:
  131.     $(CCC) $<
  132.  
  133. CC0=$(CCC)
  134. CCINT=$(CCC)
  135.  
  136. # -------------------------- Include Makefiles ---------------------------- #
  137.  
  138. !include "gs.mak"        # Borland MAKE specific
  139. !include "devs.mak"        # Borland MAKE specific
  140.  
  141. # -------------------------- Auxiliary programs --------------------------- #
  142.  
  143. # The dependencies on AK are semi-bogus: AK is null for Turbo C,
  144. # ccf.tr for Turbo/Borland C++.
  145.  
  146. ansi2knr$(XE): ansi2knr.c $(AK)
  147.     $(CC) $(CCFLAGS) -o ansi2knr ansi2knr.c
  148.     aout2exe ansi2knr
  149.  
  150. genarch$(XE): genarch.c $(AK)
  151.     $(CC) $(CCFLAGS) -o genarch genarch.c
  152.     aout2exe genarch
  153.  
  154. # We need a substitute for the Unix uniq utility.
  155. # It only has to handle stdin and stdout, no options.
  156.  
  157. uniq$(XE): uniq.c
  158.     $(CC) $(CCFLAGS) -o uniq uniq.c
  159.     aout2exe uniq
  160.  
  161. # -------------------------------- Library -------------------------------- #
  162.  
  163. # The DJ's GCC platform
  164.  
  165. djgpp__=gp_djgpp.$(OBJ)
  166. djgpp_.dev: $(djgpp__)
  167.     $(SHP)gssetmod djgpp_ $(djgpp__)
  168.  
  169. gp_djgpp.$(OBJ): gp_djgpp.c $(string__h) $(gx_h) $(gp_h) $(MAKEFILE) makefile
  170.     $(CC) $(CCFLAGS) -c gp_djgpp.c
  171.  
  172. # Build the compiler response file depending on the selected options.
  173.  
  174. ccf.tr: $(MAKEFILE) makefile
  175.     echo -I$(INCDIR) $(CCFLAGS) >ccf.tr
  176.  
  177. # ----------------------------- Main program ------------------------------ #
  178.  
  179. # Get around the fact that the DOS shell has a rather small limit on
  180. # the length of a command line.  (sigh)
  181.  
  182. # Interpreter main program
  183.  
  184. GS_ALL=gs.$(OBJ) gp_djgpp.$(OBJ) $(INT) gsmain.$(OBJ) $(LIB) \
  185.   gs_djgpp.tr obj.tr lib.tr
  186.  
  187. gs$(XE): $(GS_ALL)
  188.     $(CC) -o gs @gs_djgpp.tr @obj.tr @lib.tr -lm
  189.     aout2exe gs
  190.