home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / specific / mak / unix_gcc < prev    next >
Encoding:
Text File  |  1991-10-26  |  28.2 KB  |  873 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, Unix/gcc/X11 configuration.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ####### The following are the only parts 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 a :.
  30. # `pwd` means use the directory in which the 'make' is being done.
  31.  
  32. GS_LIB_DEFAULT=`pwd`:`pwd`/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.
  49.  
  50. GENOPT=
  51.  
  52. # ------ Platform-specific options ------ #
  53.  
  54. # Define the name of the C compiler.
  55.  
  56. CC=gcc
  57.  
  58. # Define the other compilation flags.
  59. # Add -DBSD4_2 for 4.2bsd systems.
  60. # Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX.
  61. # XCFLAGS can be set from the command line.
  62. # We don't include -ansi, because this gets in the way of the platform-
  63. #   specific stuff that <math.h> typically needs.
  64.  
  65. CFLAGS=-g -O $(XCFLAGS)
  66.  
  67. # Define platform flags for ld.
  68. # Most Unix systems accept -X, but some don't.
  69. # Sun OS4.n may need -Bstatic.
  70. # XLDFLAGS can be set from the command line.
  71.  
  72. LDFLAGS=-X $(XLDFLAGS)
  73.  
  74. # Define any extra libraries to link into the executable.
  75. # The default is for X Windows.
  76.  
  77. EXTRALIBS= -lX11
  78.  
  79. # Define the installation commands and target directories for
  80. # executables and files.  Only relevant to `make install'.
  81.  
  82. proginstall = install -m 775
  83. fileinstall = install -m 664
  84. bindir = /usr/local/gnu/bin
  85. libdir = /usr/local/gnu/lib/ghostscript
  86.  
  87. # ------ Devices and features ------ #
  88.  
  89. # Choose the language option(s) to include.  See ghost.mak for details.
  90.  
  91. FEATURES=
  92.  
  93. # Choose the device(s) to include.  See gdevs.mak for details.
  94.  
  95. DEVICES=x11
  96. DEVICE_DEVS=x11.dev
  97. DEVICE_OBJS=$(x11_)
  98.  
  99. # ---------------------------- End of options --------------------------- #
  100.  
  101. # Define the name of the makefile -- used in dependencies.
  102.  
  103. MAKEFILE=unix-gcc.mak
  104.  
  105. # Define the extensions for the object and executable files.
  106.  
  107. OBJ=o
  108. XE=
  109.  
  110. # Define the ANSI-to-K&R dependency.  (gcc accepts ANSI syntax.)
  111.  
  112. AK=
  113.  
  114. # Define the need for uniq.
  115.  
  116. UNIQ=
  117.  
  118. # Define the directory separator and shell quote string.
  119.  
  120. DS=/
  121. Q=\"
  122.  
  123. # Define the compilation rules.
  124.  
  125. CCFLAGS=$(GENOPT) $(CFLAGS)
  126.  
  127. .c.o:
  128.     $(CC) $(CCFLAGS) -c $*.c
  129.  
  130. CCC=$(CC) $(CCFLAGS) -c
  131. CC0=$(CCC)
  132. CCINT=$(CCC)
  133.  
  134. # --------------------------- Generic makefile ---------------------------- #
  135.  
  136. # The remainder of the makefile (ghost.mak, gdevs.mak, and unixtail.mak)
  137. # is generic.  tar_gs concatenates all these together.
  138. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  139. #    Distributed by Free Software Foundation, Inc.
  140. #
  141. # This file is part of Ghostscript.
  142. #
  143. # Ghostscript is distributed in the hope that it will be useful, but
  144. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  145. # to anyone for the consequences of using it or for whether it serves any
  146. # particular purpose or works at all, unless he says so in writing.  Refer
  147. # to the Ghostscript General Public License for full details.
  148. #
  149. # Everyone is granted permission to copy, modify and redistribute
  150. # Ghostscript, but only under the conditions described in the Ghostscript
  151. # General Public License.  A copy of this license is supposed to have been
  152. # given to you along with Ghostscript so you can know your rights and
  153. # responsibilities.  It should be in a file named COPYING.  Among other
  154. # things, the copyright notice and this notice must be preserved on all
  155. # copies.
  156.  
  157. # Generic makefile for Ghostscript.
  158. # The platform-specific makefiles `include' this file.
  159. # They define the following symbols:
  160. #    GS_INIT - the name of the initialization file for Ghostscript,
  161. #        normally gs_init.ps.
  162. #    GS_LIB_DEFAULT - the default directory/ies for searching for the
  163. #        initialization and font files at run time.
  164. #    DEVICES, DEVICE_DEVS, DEVICE_OBJS - the devices to include in the
  165. #        executable.  See gdevs.mak for details.
  166. #    FEATURES - the optional features to include in the executable.
  167. #        (Currently no such features are defined; this is just a
  168. #        place-holder.)
  169. # It is very unlikely that anyone would want to edit the remaining
  170. #   symbols, but we describe them here for completeness:
  171. #    Q - the string that causes the shell to pass a " to a program
  172. #        (" on MS-DOS, \" on Unix).
  173. #    XE - the extension for executable files (e.g., null or .exe).
  174. #    OBJ - the extension for relocatable object files (e.g., o or obj).
  175. #    CCC - the C invocation for normal compilation.
  176. #    CC0 - a C invocation with the fewer possible flags.  Needed because
  177. #        MS-DOS limits the length of command lines to 128 characters.
  178. #    CCINT - the C invocation for compiling the main interpreter module,
  179. #        normally the same as CCC: this is needed because the
  180. #        Borland compiler generates *worse* code for this module
  181. #        (but only this module) when optimization (-O) is turned on.
  182. #    AK - if source files must be converted from ANSI to K&R syntax,
  183. #        this is ansi2knr$(XE); if not, it is null.
  184. #    UNIQ - null on systems that provide the uniq utility,
  185. #        uniq$(XE) on systems where we have to provide our own.
  186. #    DS - the directory separator (/ or \).
  187. # The platform-specific makefiles must also include rules for creating
  188. #   ansi2knr$(XE) and genarch$(XE) from the corresponding .c files,
  189. #   and for making arch.h by executing genarch$(XE).  (This
  190. #   shouldn't really be necessary, but Turbo C and Unix C treat the -o
  191. #   switch slightly differently (Turbo C requires no following space,
  192. #   Unix C requires a following space), and I haven't found a way to capture
  193. #   the difference in a macro; also, Unix requires ./ because . may not be
  194. #   in the search path, whereas MS-DOS always looks in the current
  195. #   directory first.)
  196.  
  197. default: gs$(XE)
  198.  
  199. test: gt$(XE)
  200.  
  201. clean:
  202.     rm -f *.$(OBJ) *.a core gmon.out
  203.     rm -f *.dev gconfig.h gconfig.tr
  204.     rm -f t _temp_* _temp_*.* libc*.tr *.map *.sym
  205.     rm -f ansi2knr$(XE) genarch$(XE) uniq$(XE) arch.h gs$(XE)
  206.  
  207. # Note: Unix uses malloc.h and memory.h;
  208. # Turbo C uses alloc.h, stdlib.h, and mem.h.
  209. # 4.2bsd uses strings.h; other systems use string.h.
  210. # gcc on VMS doesn't have a math.h.
  211. # We handle this by using local include files called
  212. # malloc_.h, math_.h, memory_.h, and string_.h
  213. # that perform appropriate indirection.
  214.  
  215. # Auxiliary programs
  216.  
  217. # genarch may cause a (deliberate) addressing fault,
  218. # so we invoke it with a preceding -.
  219.  
  220. arch.h: genarch$(XE)
  221.     - .$(DS)genarch arch.h
  222.  
  223. # -------------------------------- Library -------------------------------- #
  224.  
  225. gs.h: std.h
  226.     touch gs.h
  227.  
  228. gx.h: gs.h
  229.     touch gx.h
  230.  
  231. GX=$(AK) std.h gx.h
  232. GXERR=$(GX) gserrors.h
  233.  
  234. ###### High-level facilities
  235.  
  236. gschar.$(OBJ): gschar.c $(GXERR) \
  237.   gxfixed.h gxarith.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gstype1.h gspath.h gzpath.h gzcolor.h gzstate.h
  238.  
  239. gschar0.$(OBJ): gschar0.c $(GXERR) \
  240.   gxfixed.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gzstate.h
  241.  
  242. gscolor.$(OBJ): gscolor.c $(GXERR) \
  243.   gxfixed.h gxmatrix.h gxdevice.h gzstate.h gzcolor.h gzht.h
  244.  
  245. gscoord.$(OBJ): gscoord.c $(GXERR) \
  246.   gxfixed.h gxmatrix.h gzdevice.h gzstate.h gscoord.h
  247.  
  248. gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  249.   gxfixed.h gxmatrix.h gxbitmap.h gxdevmem.h gzstate.h gzdevice.h
  250.  
  251. gsfile.$(OBJ): gsfile.c $(GXERR) \
  252.   gsmatrix.h gxdevice.h gxdevmem.h
  253.  
  254. gsfont.$(OBJ): gsfont.c $(GXERR) \
  255.   gxdevice.h gxfixed.h gxmatrix.h gxfont.h gxfdir.h gzstate.h
  256.  
  257. gsimage.$(OBJ): gsimage.c $(GXERR) \
  258.   arch.h gxfixed.h gxarith.h gxmatrix.h gspaint.h gzcolor.h gzdevice.h gzpath.h gzstate.h gximage.h
  259.  
  260. gsim2out.$(OBJ): gsim2out.c $(GXERR) \
  261.   gsstate.h gsmatrix.h gscoord.h gxfixed.h gxtype1.h
  262.  
  263. gsline.$(OBJ): gsline.c $(GXERR) \
  264.   gxfixed.h gxmatrix.h gzstate.h gzline.h
  265.  
  266. gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  267.   gxfixed.h gxarith.h gxmatrix.h
  268.  
  269. gsmisc.$(OBJ): gsmisc.c $(GX)
  270.  
  271. gspaint.$(OBJ): gspaint.c $(GX) \
  272.   gxfixed.h gxmatrix.h gspaint.h gzpath.h gzstate.h gzdevice.h gximage.h
  273.  
  274. gspath.$(OBJ): gspath.c $(GXERR) \
  275.   gxfixed.h gxmatrix.h gxpath.h gzstate.h
  276.  
  277. gspath2.$(OBJ): gspath2.c $(GXERR) \
  278.   gspath.h gxfixed.h gxmatrix.h gzstate.h gzpath.h gzdevice.h
  279.  
  280. gsstate.$(OBJ): gsstate.c $(GXERR) \
  281.   gxfixed.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzht.h gzline.h gzpath.h
  282.  
  283. gstdev.$(OBJ): gstdev.c $(GX) \
  284.   gxbitmap.h gxdevice.h gxfixed.h gxmatrix.h
  285.  
  286. gstype1.$(OBJ): gstype1.c $(GXERR) \
  287.   gxarith.h gxfixed.h gxmatrix.h gxchar.h gxdevmem.h gxop1.h gxtype1.h \
  288.   gzstate.h gzdevice.h gzpath.h
  289.  
  290. ###### Low-level facilities
  291.  
  292. ### Nested include files
  293.  
  294. gsstate.h: gscolor.h
  295.     touch gsstate.h
  296.  
  297. gxchar.h: gschar.h
  298.     touch gxchar.h
  299.  
  300. gxfont.h: gsfont.h
  301.     touch gxfont.h
  302.  
  303. gxmatrix.h: gsmatrix.h
  304.     touch gxmatrix.h
  305.  
  306. gxtype1.h: gstype1.h
  307.     touch gxtype1.h
  308.  
  309. gzcolor.h: gscolor.h
  310.     touch gzcolor.h
  311.  
  312. gzdevice.h: gxdevice.h
  313.     touch gzdevice.h
  314.  
  315. gzpath.h: gxpath.h
  316.     touch gzpath.h
  317.  
  318. gzstate.h: gsstate.h
  319.     touch gzstate.h
  320.  
  321. ### Executable code
  322.  
  323. gxcache.$(OBJ): gxcache.c $(GXERR) \
  324.   gxfixed.h gxmatrix.h gspaint.h gzdevice.h gzcolor.h gxdevmem.h gxfont.h gxfdir.h gxchar.h gzstate.h gzpath.h
  325.  
  326. gxclist.$(OBJ): gxclist.c $(GXERR) \
  327.   gsmatrix.h gxbitmap.h gxclist.h gxdevice.h gxdevmem.h
  328.  
  329. gxcolor.$(OBJ): gxcolor.c $(GXERR) \
  330.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzht.h gzstate.h
  331.  
  332. gxdither.$(OBJ): gxdither.c $(GX) \
  333.   gxfixed.h gxmatrix.h gzstate.h gzdevice.h gzcolor.h gzht.h
  334.  
  335. gxdraw.$(OBJ): gxdraw.c $(GX) \
  336.   gxfixed.h gxmatrix.h gxbitmap.h gzcolor.h gzdevice.h gzstate.h
  337.  
  338. gxfill.$(OBJ): gxfill.c $(GXERR) \
  339.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzpath.h gzstate.h
  340.  
  341. gxht.$(OBJ): gxht.c $(GXERR) \
  342.   gxfixed.h gxmatrix.h gxbitmap.h gzstate.h gzcolor.h gzdevice.h gzht.h
  343.  
  344. gxpath.$(OBJ): gxpath.c $(GXERR) \
  345.   gxfixed.h gzpath.h
  346.  
  347. gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  348.   gxfixed.h gxarith.h gzpath.h
  349.  
  350. gxstroke.$(OBJ): gxstroke.c $(GXERR) \
  351.   gxfixed.h gxarith.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzline.h gzpath.h
  352.  
  353. ###### The "memory" device
  354.  
  355. gdevmem.$(OBJ): gdevmem.c $(AK) \
  356.   gs.h arch.h gxbitmap.h gsmatrix.h gxdevice.h gxdevmem.h
  357.  
  358. ###### Files dependent on the set of installed devices.
  359. ###### Generating gconfig.h also generates gconfig.tr.
  360.  
  361. gconfig.h gconfig.tr: gdevs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS)
  362.     .$(DS)gsconfig $(DEVICES) + $(FEATURES)
  363.  
  364. gconfig.$(OBJ): gconfig.c $(AK) gconfig.h $(MAKEFILE)
  365.     $(CC0) -DGS_LIB_DEFAULT=$(Q)$(GS_LIB_DEFAULT)$(Q) -DGS_INIT=$(Q)$(GS_INIT)$(Q) gconfig.c
  366.  
  367. ###### On Unix, we pre-link all of the library except the back end.
  368. ###### On MS-DOS, we have to do the whole thing at once.
  369.  
  370. LIB=gschar.$(OBJ) gschar0.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
  371.  gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) \
  372.  gsimage.$(OBJ) gsim2out.$(OBJ) \
  373.  gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  374.  gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
  375.  gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) \
  376.  gxcache.$(OBJ) gxclist.$(OBJ) gxcolor.$(OBJ) \
  377.  gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  378.  gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \
  379.  gdevmem.$(OBJ) gconfig.$(OBJ)
  380.  
  381. # ------------------------------ Interpreter ------------------------------ #
  382.  
  383. ###### Utilities
  384.  
  385. GH=$(AK) ghost.h
  386.  
  387. ialloc.$(OBJ): ialloc.c $(AK) gs.h alloc.h astate.h
  388.  
  389. idebug.$(OBJ): idebug.c $(GH) \
  390.  iutil.h dict.h name.h ostack.h opdef.h packed.h store.h
  391.  
  392. idict.$(OBJ): idict.c $(GH) alloc.h errors.h name.h save.h store.h dict.h
  393.  
  394. iinit.$(OBJ): iinit.c $(GH) alloc.h dict.h errors.h name.h oper.h store.h
  395.  
  396. iname.$(OBJ): iname.c $(GH) alloc.h errors.h name.h store.h
  397.  
  398. isave.$(OBJ): isave.c $(GH) alloc.h astate.h name.h save.h store.h
  399.  
  400. iscan.$(OBJ): iscan.c $(GH) arch.h alloc.h dict.h errors.h iutil.h \
  401.  name.h ostack.h packed.h store.h stream.h scanchar.h
  402.  
  403. iutil.$(OBJ): iutil.c $(GH) \
  404.  errors.h alloc.h iutil.h name.h ostack.h oper.h store.h \
  405.  gsmatrix.h gxdevice.h gzcolor.h
  406.  
  407. stream.$(OBJ): stream.c $(AK) std.h stream.h scanchar.h gxfixed.h gstype1.h
  408.  
  409. ###### Operators
  410.  
  411. ghost.h: gx.h
  412.     touch ghost.h
  413.  
  414. oper.h: iutil.h opdef.h ostack.h
  415.     touch oper.h
  416.  
  417. OP=$(GH) errors.h oper.h ostack.h
  418.  
  419. ### Non-graphics operators
  420.  
  421. zarith.$(OBJ): zarith.c $(OP) store.h
  422.  
  423. zarray.$(OBJ): zarray.c $(OP) alloc.h packed.h store.h
  424.  
  425. zcontrol.$(OBJ): zcontrol.c $(OP) estack.h iutil.h store.h
  426.  
  427. zdict.$(OBJ): zdict.c $(OP) dict.h store.h
  428.  
  429. zfile.$(OBJ): zfile.c $(OP) gp.h \
  430.   alloc.h estack.h file.h iutil.h save.h stream.h store.h
  431.  
  432. zfileio.$(OBJ): zfileio.c $(OP) \
  433.   estack.h file.h store.h stream.h \
  434.   gsmatrix.h gxdevice.h gxdevmem.h
  435.  
  436. zgeneric.$(OBJ): zgeneric.c $(OP) dict.h estack.h name.h packed.h store.h
  437.  
  438. zmath.$(OBJ): zmath.c $(OP) store.h
  439.  
  440. zmisc.$(OBJ): zmisc.c $(OP) gp.h alloc.h dict.h name.h packed.h store.h \
  441.   gstype1.h gxfixed.h
  442.  
  443. zpacked.$(OBJ): zpacked.c $(OP) \
  444.   arch.h alloc.h dict.h name.h packed.h save.h store.h
  445.  
  446. zrelbit.$(OBJ): zrelbit.c $(OP) store.h dict.h
  447.  
  448. zstack.$(OBJ): zstack.c $(OP) store.h
  449.  
  450. zstring.$(OBJ): zstring.c $(OP) alloc.h iutil.h name.h store.h stream.h
  451.  
  452. ztype.$(OBJ): ztype.c $(OP) dict.h iutil.h name.h stream.h store.h
  453.  
  454. zvmem.$(OBJ): zvmem.c $(OP) alloc.h estack.h save.h state.h store.h \
  455.   gsmatrix.h gsstate.h
  456.  
  457. ###### Graphics operators
  458.  
  459. zchar.$(OBJ): zchar.c $(OP) gxmatrix.h gschar.h gstype1.h gxdevice.h gxfixed.h gxfont.h gzpath.h gzstate.h alloc.h dict.h font.h estack.h state.h store.h
  460.  
  461. zcolor.$(OBJ): zcolor.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h gzcolor.h iutil.h state.h store.h
  462.  
  463. zdevice.$(OBJ): zdevice.c $(OP) alloc.h state.h gsmatrix.h gsstate.h gxdevice.h store.h
  464.  
  465. zfont.$(OBJ): zfont.c $(OP) gsmatrix.h gxdevice.h gxfont.h gxfdir.h \
  466.  alloc.h font.h dict.h name.h packed.h save.h state.h store.h
  467.  
  468. zfont0.$(OBJ): zfont0.c $(OP) gsmatrix.h gxdevice.h gxfont.h \
  469.  alloc.h font.h dict.h name.h state.h store.h
  470.  
  471. zfont2.$(OBJ): zfont2.c $(OP) gsmatrix.h gxdevice.h gschar.h gxfixed.h gxfont.h \
  472.  alloc.h dict.h font.h name.h packed.h store.h
  473.  
  474. zgstate.$(OBJ): zgstate.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  475.  
  476. zht.$(OBJ): zht.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h state.h store.h
  477.  
  478. zmatrix.$(OBJ): zmatrix.c $(OP) gsmatrix.h state.h gscoord.h store.h
  479.  
  480. zpaint.$(OBJ): zpaint.c $(OP) alloc.h estack.h gsmatrix.h gspaint.h state.h store.h
  481.  
  482. zpath.$(OBJ): zpath.c $(OP) gsmatrix.h gspath.h state.h store.h
  483.  
  484. zpath2.$(OBJ): zpath2.c $(OP) alloc.h estack.h gspath.h state.h store.h
  485.  
  486. ###### Linking
  487.  
  488. INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) iinit.$(OBJ) iname.$(OBJ) \
  489.  interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) stream.$(OBJ) \
  490.  zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
  491.  zfile.$(OBJ) zfileio.$(OBJ) zgeneric.$(OBJ) \
  492.  zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zrelbit.$(OBJ) \
  493.  zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  494.  zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont0.$(OBJ) zfont2.$(OBJ) \
  495.  zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
  496.  zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  497.  
  498. # ----------------------------- Main program ------------------------------ #
  499.  
  500. # Utilities shared between platforms
  501.  
  502. gsmain.$(OBJ): gsmain.c $(GX) \
  503.   gp.h gsmatrix.h gxdevice.h
  504.  
  505. # The default font
  506.  
  507. uglyr.gsf: ugly10.bdf bdftops.ps gs$(XE)
  508.     .$(DS)gs -q -dNODISPLAY -- bdftops.ps ugly10.bdf uglyr.gsf
  509.  
  510. # Interpreter main program
  511.  
  512. interp.$(OBJ): interp.c $(GH) \
  513.   errors.h estack.h name.h dict.h oper.h ostack.h packed.h save.h store.h stream.h
  514.     $(CCINT) interp.c
  515.  
  516. gs.$(OBJ): gs.c $(GH) alloc.h estack.h ostack.h store.h stream.h
  517. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  518. #    Distributed by Free Software Foundation, Inc.
  519. #
  520. # This file is part of Ghostscript.
  521. #
  522. # Ghostscript is distributed in the hope that it will be useful, but
  523. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  524. # to anyone for the consequences of using it or for whether it serves any
  525. # particular purpose or works at all, unless he says so in writing.  Refer
  526. # to the Ghostscript General Public License for full details.
  527. #
  528. # Everyone is granted permission to copy, modify and redistribute
  529. # Ghostscript, but only under the conditions described in the Ghostscript
  530. # General Public License.  A copy of this license is supposed to have been
  531. # given to you along with Ghostscript so you can know your rights and
  532. # responsibilities.  It should be in a file named COPYING.  Among other
  533. # things, the copyright notice and this notice must be preserved on all
  534. # copies.
  535.  
  536. # makefile for Ghostscript device drivers.
  537.  
  538. # -------------------------------- Catalog ------------------------------- #
  539.  
  540. # It is possible to build Ghostscript with an arbitrary collection of
  541. # device drivers, although many drivers are supported only on a subset
  542. # of the target platforms.  The currently available drivers are:
  543.  
  544. # Displays:
  545. #    bgi    Borland Graphics Interface   [MS-DOS only]
  546. #    ega    EGA display   [MS-DOS only]
  547. # +    mdb10    EIZO MDB-10 display (1024 x 768)   [MS-DOS only]
  548. # *    pe    Private Eye display  [MS-DOS only]
  549. # +    sonyfb    Sony Microsystems monochrome display   [Sony only]
  550. #    sunview  SunView window system   [SunOS only]
  551. #    vga    VGA display   [MS-DOS only]
  552. #    x11    X Windows version 11, release >=3   [Unix only]
  553. # Printers:
  554. #    bit    A "bit bucket" device for time benchmarking
  555. # +    bj10e    Canon BubbleJet BJ10e  [MS-DOS only]
  556. # +    deskjet  H-P DeskJet   [MS-DOS & Unix]
  557. #    epson    Epson dot matrix printers   [MS-DOS & Unix]
  558. # +    laserjet  H-P LaserJet   [MS-DOS & Unix]
  559. # +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression   [ditto]
  560. # +    ljet3    H-P LaserJet III* with Delta Row compression   [ditto]
  561. # +    nwp533  Sony Microsystems NWP533 laser printer   [Sony only]
  562. # +    paintjet  H-P PaintJet color printer [MS-DOS & Unix]
  563. # *    trufax    TruFax facsimile driver  [Unix only]
  564.  
  565. # User-contributed drivers marked with * require hardware or software
  566. # that is not available to Aladdin Enterprises.  Please contact the
  567. # original contributors, not Aladdin Enterprises, if you have questions.
  568. # Contact information appears in the driver entry below.  Drivers marked
  569. # with a + are maintained by Aladdin Enterprises with the assistance of
  570. # users, since Aladdin Enterprises doesn't have the hardware for these
  571. # either.
  572.  
  573. # If you add drivers, it would be nice if you kept each list
  574. # in alphabetical order.
  575.  
  576. # Each platform-specific makefile must contain lines of the form
  577. #    DEVICES=<dev1> ... <devn>
  578. #    DEVICE_DEVS=<dev1>.dev ... <devn>.dev
  579. #    DEVICE_OBJS=$(<dev1>_) ... $(<devn>_)
  580. # where dev1 ... devn are the devices to be included in the build.
  581. # dev1 will be used as the default device.  Don't forget the _s!
  582. # On MS-DOS platforms, the first two of these lines must appear *before*,
  583. # and the last *after*, the lines
  584. #    (!)include gdevs.mak
  585. #    (!)include ghost.mak
  586. # in the makefile.  On Unix systems, these device definition lines
  587. # may appear anywhere in the makefile.
  588. #
  589. # The executable must be linked with all the files named in DEVICE_OBJS.
  590. # On MS-DOS platforms, this is done by constructing a file called
  591. # gconfig.tr, to get around the limit on the length of a DOS command line.
  592.  
  593. # ---------------------------- End of catalog ---------------------------- #
  594.  
  595. # If you want to add a new device driver, the examples below should be
  596. # enough of a guide to the correct form for the makefile rules.
  597. #
  598. # ****** IMPORTANT NOTE ******
  599. #
  600. # The names of the relocatable (.OBJ) files for MS-DOS drivers
  601. # must be unique in the first *7* characters, because of the way
  602. # the makefile eliminates duplicates.
  603.  
  604. # All device drivers depend on the following
  605. # (note that we include some indirect dependencies explicitly):
  606.  
  607. GDEV=$(AK) gs.h gx.h gsmatrix.h gxbitmap.h gxdevice.h
  608.  
  609. ###### ------------------- MS-DOS display devices ------------------- ######
  610.  
  611. ### All the devices use the same driver, with different parameters.
  612.  
  613. gdevegaa.$(OBJ): gdevegaa.asm
  614.  
  615. ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_)
  616. ega.exe: $(ETEST) libc$(MM).tr
  617.     tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr
  618.  
  619. ega.$(OBJ): ega.c $(GDEV)
  620.  
  621. PCFB=gdevpcfb.$(OBJ) gdevegaa.$(OBJ)
  622.  
  623. gdevpcfb.$(OBJ): gdevpcfb.c $(GDEV)
  624.  
  625. ### -------------------------- The EGA device -------------------------- ###
  626.  
  627. ega_=$(PCFB)
  628. ega.dev: $(ega_)
  629.     .$(DS)gssetdev ega.dev $(ega_)
  630.  
  631. ### -------------------------- The VGA device -------------------------- ###
  632.  
  633. vga_=$(PCFB)
  634. vga.dev: $(vga_)
  635.     .$(DS)gssetdev vga.dev $(vga_)
  636.  
  637. ### ---------------------- The EIZO MDB-10 device ---------------------- ###
  638.  
  639. mdb10_=$(PCFB)
  640. mdb10.dev: $(mdb10_)
  641.     .$(DS)gssetdev mdb10.dev $(mdb10_)
  642.  
  643. ###### --------- The BGI (Borland Graphics Interface) device -------- ######
  644.  
  645. bgi_=gdevbgi.$(OBJ) egavga.$(OBJ)
  646. bgi.dev: $(bgi_)
  647.     .$(DS)gssetdev bgi.dev $(bgi_)
  648.  
  649. gdevbgi.$(OBJ): gdevbgi.c $(GDEV)
  650.  
  651. egavga.$(OBJ): $(BGIDIR)\egavga.bgi
  652.     $(BGIDIR)\bgiobj $(BGIDIR)\egavga
  653.  
  654. ###### ------------------- The Private Eye display ------------------- ######
  655. ### Note: this driver was contributed by a user:                          ###
  656. ###   please contact narf@media-lab.media.mit.edu if you have questions.  ###
  657.  
  658. pe_=gdevpe.$(OBJ)
  659. pe.dev: $(pe_)
  660.     .$(DS)gssetdev pe.dev $(pe_)
  661.  
  662. gdevpe.$(OBJ): gdevpe.c $(GDEV)
  663.  
  664. ###### --------------- Memory-buffered printer devices --------------- ######
  665.  
  666. PDEVH=$(GDEV) gxdevmem.h gxclist.h gdevprn.h
  667.  
  668. gdevprn.$(OBJ): gdevprn.c $(PDEVH)
  669.  
  670. ### ---------------------- The bit bucket device ----------------------- ###
  671.  
  672. bit_=gdevbit.$(OBJ) gdevprn.$(OBJ)
  673. bit.dev: $(bit_)
  674.     .$(DS)gssetdev bit.dev $(bit_)
  675.  
  676. gdevbit.$(OBJ): gdevbit.c $(PDEVH)
  677.  
  678. ### ----------------- The Canon BubbleJet BJ10e device ----------------- ###
  679.  
  680. bj10e_=gdevbj10.$(OBJ) gdevprn.$(OBJ)
  681. bj10e.dev: $(bj10e_)
  682.     .$(DS)gssetdev bj10e.dev $(bj10e_)
  683.  
  684. gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
  685.  
  686. ### ----------- The H-P DeskJet and LaserJet printer devices ----------- ###
  687.  
  688. ### These are essentially the same device.
  689.  
  690. HPMONO=gdevdjet.$(OBJ) gdevprn.$(OBJ)
  691.  
  692. gdevdjet.$(OBJ): gdevdjet.c $(PDEVH)
  693.  
  694. deskjet_=$(HPMONO)
  695. deskjet.dev: $(deskjet_)
  696.     .$(DS)gssetdev deskjet.dev $(deskjet_)
  697.  
  698. laserjet_=$(HPMONO)
  699. laserjet.dev: $(laserjet_)
  700.     .$(DS)gssetdev laserjet.dev $(laserjet_)
  701.  
  702. ### Selecting ljet2p provides TIFF (mode 2) compression on LaserJet III,
  703. ### IIIp, IIId, IIIsi, IId, and IIp. 
  704.  
  705. ljet2p_=$(HPMONO)
  706. ljet2p.dev: $(ljet2p_)
  707.     .$(DS)gssetdev ljet2p.dev $(ljet2p_)
  708.  
  709. ### Selecting ljet3 provides Delta Row (mode 3) compression on LaserJet III,
  710. ### IIIp, IIId, IIIsi.
  711.  
  712. ljet3_=$(HPMONO)
  713. ljet3.dev: $(ljet3_)
  714.     .$(DS)gssetdev ljet3.dev $(ljet3_)
  715.  
  716. ### ----------------- The generic Epson printer device ----------------- ###
  717. ### Note that you can set the default density in the command line below. ###
  718.  
  719. epson_=gdevepsn.$(OBJ) gdevprn.$(OBJ)
  720. epson.dev: $(epson_)
  721.     .$(DS)gssetdev epson.dev $(epson_)
  722.  
  723. gdevepsn.$(OBJ): gdevepsn.c $(PDEVH) gdevs.mak
  724.     $(CCC) -DX_DPI=180 -DY_DPI=180 gdevepsn.c
  725.  
  726. ### ------------ The H-P PaintJet color printer device ----------------- ###
  727. ### Note: this driver was contributed by users:                          ###
  728. ###       please contact marc@vlsi.polymtl.ca if you have questions.     ###
  729. ### The files are packaged separately from the rest of the fileset.      ###
  730.  
  731. paintjet_=gdevpjet.$(OBJ) gdevprn.$(OBJ)
  732. paintjet.dev: $(paintjet_)
  733.     .$(DS)gssetdev paintjet.dev $(paintjet_)
  734.  
  735. gdevpjet.$(OBJ): gdevpjet.c $(PDEVH)
  736.  
  737. ###### ------------------ Sony frame buffer device ----------------- ######
  738.  
  739. sonyfb_=gdevsnfb.$(OBJ) gdevprn.$(OBJ)
  740. sonyfb.dev: $(sonyfb_)
  741.     .$(DS)gssetdev sonyfb.dev $(sonyfb_)
  742.  
  743. gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
  744.  
  745. ###### ----------------- Sony NWP533 printer device ----------------- ######
  746.  
  747. nwp533_=gdevn533.$(OBJ) gdevprn.$(OBJ)
  748. nwp533.dev: $(nwp533_)
  749.     .$(DS)gssetdev nwp533.dev $(nwp533_)
  750.  
  751. gdevn533.$(OBJ): gdevn533.c $(PDEVH)
  752.  
  753. ###### --------------------- The SunView device --------------------- ######
  754.  
  755. sunview_=gdevsun.$(OBJ)
  756. sunview.dev: $(sunview_)
  757.     .$(DS)gssetdev sunview.dev $(sunview_)
  758.  
  759. gdevsun.$(OBJ): gdevsun.c $(GDEV) arch.h
  760.  
  761. ### ----------------- The TruFax facsimile device ---------------------- ###
  762. ### Note: this driver was contributed by users:                          ###
  763. ###       please contact nao@bellcore.com if you have questions.         ###
  764. ### Note that the driver requires a file encode_l.o supplied by the      ###
  765. ###   makers of the TruFax product.                                      ###
  766.  
  767. trufax_=gdevtrfx.$(OBJ) gdevprn.$(OBJ) encode_l.$(OBJ)
  768. trufax.dev: $(trufax_)
  769.     .$(DS)gssetdev trufax.dev $(trufax_)
  770.  
  771. gdevtrfx.$(OBJ): gdevtrfx.c $(GDEV)
  772.  
  773. ###### ----------------------- The X11 device ----------------------- ######
  774.  
  775. x11_=gdevx.$(OBJ)
  776. x11.dev: $(x11_)
  777.     .$(DS)gssetdev x11.dev $(x11_)
  778.  
  779. ### Note: if the X11 client header libraries are located in a directory
  780. ### which your compiler automatically searches, you may remove the -I switch
  781. ### from the compilation line below; if not, you may have to edit the line
  782. ### so that it mentions the correct directory.
  783. gdevx.$(OBJ): gdevx.c $(GDEV) gdevx.h
  784.     $(CCC) -I/usr/local/X/include gdevx.c
  785. #    Copyright (C) 1990, 1991 Aladdin Enterprises.  All rights reserved.
  786. #    Distributed by Free Software Foundation, Inc.
  787. #
  788. # This file is part of Ghostscript.
  789. #
  790. # Ghostscript is distributed in the hope that it will be useful, but
  791. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  792. # to anyone for the consequences of using it or for whether it serves any
  793. # particular purpose or works at all, unless he says so in writing.  Refer
  794. # to the Ghostscript General Public License for full details.
  795. #
  796. # Everyone is granted permission to copy, modify and redistribute
  797. # Ghostscript, but only under the conditions described in the Ghostscript
  798. # General Public License.  A copy of this license is supposed to have been
  799. # given to you along with Ghostscript so you can know your rights and
  800. # responsibilities.  It should be in a file named COPYING.  Among other
  801. # things, the copyright notice and this notice must be preserved on all
  802. # copies.
  803.  
  804. # Partial makefile for Ghostscript, common to all Unix configurations.
  805.  
  806. # This is the last part of the makefile for Unix configurations.
  807. # Since Unix make doesn't have an 'include' facility, we concatenate
  808. # the various parts of the makefile together by brute force (in tar_gs).
  809.  
  810. # -------------------------------- Library -------------------------------- #
  811.  
  812. ## The Unix platform
  813.  
  814. PLATUNIX=gp_unix.$(OBJ)
  815.  
  816. gp_unix.$(OBJ): gp_unix.c gp.h
  817.  
  818. # -------------------------- Auxiliary programs --------------------------- #
  819.  
  820. ansi2knr$(XE):
  821.     $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c $(EXTRALIBS)
  822.  
  823. genarch$(XE): genarch.c
  824.     $(CC) -o genarch$(XE) $(CFLAGS) genarch.c $(EXTRALIBS)
  825.  
  826. # ----------------------------- Main program ------------------------------ #
  827.  
  828. # (Dummy) tracing package
  829.  
  830. utrace.$(OBJ): utrace.c cframe_.h
  831.  
  832. # Main program
  833.  
  834. ALLUNIX=gsmain.$(OBJ) utrace.$(OBJ) $(LIB) $(PLATUNIX) $(DEVICE_OBJS)
  835.  
  836. # Interpreter main program
  837.  
  838. GSUNIX=gs.$(OBJ) $(INT) $(ALLUNIX)
  839.  
  840. gs: $(GSUNIX)
  841.     $(CC) $(LDFLAGS) -o gs $(GSUNIX) $(EXTRALIBS) -lm
  842.  
  843. # Installation
  844.  
  845. sysps = gs_init.ps gs_fonts.ps gs_statd.ps symbol_e.ps gconfig.ps quit.ps
  846. sysfiles = $(sysps) Fontmap uglyr.gsf
  847. artps = chess.ps cheq.ps golfer.ps escher.ps
  848. utilps = decrypt.ps bdftops.ps pfbtops.ps pstoppm.ps fcutils.ps prfont.ps
  849.  
  850. install:
  851.     $(proginstall) gs $(bindir)
  852.     $(proginstall) gsnd $(bindir)
  853.     $(proginstall) bdftops $(bindir)
  854.     $(proginstall) pfbtops $(bindir)
  855.     $(fileinstall) gs_init.ps $(libdir)
  856.     $(fileinstall) gs_fonts.ps $(libdir)
  857.     $(fileinstall) gs_statd.ps $(libdir)
  858.     $(fileinstall) symbol_e.ps $(libdir)
  859.     $(fileinstall) gconfig.ps $(libdir)
  860.     $(fileinstall) quit.ps $(libdir)
  861.     $(fileinstall) Fontmap $(libdir)
  862.     $(fileinstall) uglyr.gsf $(libdir)
  863.     $(fileinstall) chess.ps $(libdir)
  864.     $(fileinstall) cheq.ps $(libdir)
  865.     $(fileinstall) golfer.ps $(libdir)
  866.     $(fileinstall) escher.ps $(libdir)
  867.     $(fileinstall) decrypt.ps $(libdir)
  868.     $(fileinstall) bdftops.ps $(libdir)
  869.     $(fileinstall) pfbtops.ps $(libdir)
  870.     $(fileinstall) pstoppm.ps $(libdir)
  871.     $(fileinstall) fcutils.ps $(libdir)
  872.     $(fileinstall) prfont.ps $(libdir)
  873.