home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / specific / mak / ghost < prev    next >
Encoding:
Text File  |  1991-10-26  |  12.4 KB  |  380 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. # Generic makefile for Ghostscript.
  21. # The platform-specific makefiles `include' this file.
  22. # They define the following symbols:
  23. #    GS_INIT - the name of the initialization file for Ghostscript,
  24. #        normally gs_init.ps.
  25. #    GS_LIB_DEFAULT - the default directory/ies for searching for the
  26. #        initialization and font files at run time.
  27. #    DEVICES, DEVICE_DEVS, DEVICE_OBJS - the devices to include in the
  28. #        executable.  See gdevs.mak for details.
  29. #    FEATURES - the optional features to include in the executable.
  30. #        (Currently no such features are defined; this is just a
  31. #        place-holder.)
  32. # It is very unlikely that anyone would want to edit the remaining
  33. #   symbols, but we describe them here for completeness:
  34. #    Q - the string that causes the shell to pass a " to a program
  35. #        (" on MS-DOS, \" on Unix).
  36. #    XE - the extension for executable files (e.g., null or .exe).
  37. #    OBJ - the extension for relocatable object files (e.g., o or obj).
  38. #    CCC - the C invocation for normal compilation.
  39. #    CC0 - a C invocation with the fewer possible flags.  Needed because
  40. #        MS-DOS limits the length of command lines to 128 characters.
  41. #    CCINT - the C invocation for compiling the main interpreter module,
  42. #        normally the same as CCC: this is needed because the
  43. #        Borland compiler generates *worse* code for this module
  44. #        (but only this module) when optimization (-O) is turned on.
  45. #    AK - if source files must be converted from ANSI to K&R syntax,
  46. #        this is ansi2knr$(XE); if not, it is null.
  47. #    UNIQ - null on systems that provide the uniq utility,
  48. #        uniq$(XE) on systems where we have to provide our own.
  49. #    DS - the directory separator (/ or \).
  50. # The platform-specific makefiles must also include rules for creating
  51. #   ansi2knr$(XE) and genarch$(XE) from the corresponding .c files,
  52. #   and for making arch.h by executing genarch$(XE).  (This
  53. #   shouldn't really be necessary, but Turbo C and Unix C treat the -o
  54. #   switch slightly differently (Turbo C requires no following space,
  55. #   Unix C requires a following space), and I haven't found a way to capture
  56. #   the difference in a macro; also, Unix requires ./ because . may not be
  57. #   in the search path, whereas MS-DOS always looks in the current
  58. #   directory first.)
  59.  
  60. default: gs$(XE)
  61.  
  62. test: gt$(XE)
  63.  
  64. clean:
  65.     rm -f *.$(OBJ) *.a core gmon.out
  66.     rm -f *.dev gconfig.h gconfig.tr
  67.     rm -f t _temp_* _temp_*.* libc*.tr *.map *.sym
  68.     rm -f ansi2knr$(XE) genarch$(XE) uniq$(XE) arch.h gs$(XE)
  69.  
  70. # Note: Unix uses malloc.h and memory.h;
  71. # Turbo C uses alloc.h, stdlib.h, and mem.h.
  72. # 4.2bsd uses strings.h; other systems use string.h.
  73. # gcc on VMS doesn't have a math.h.
  74. # We handle this by using local include files called
  75. # malloc_.h, math_.h, memory_.h, and string_.h
  76. # that perform appropriate indirection.
  77.  
  78. # Auxiliary programs
  79.  
  80. # genarch may cause a (deliberate) addressing fault,
  81. # so we invoke it with a preceding -.
  82.  
  83. arch.h: genarch$(XE)
  84.     - .$(DS)genarch arch.h
  85.  
  86. # -------------------------------- Library -------------------------------- #
  87.  
  88. gs.h: std.h
  89.     touch gs.h
  90.  
  91. gx.h: gs.h
  92.     touch gx.h
  93.  
  94. GX=$(AK) std.h gx.h
  95. GXERR=$(GX) gserrors.h
  96.  
  97. ###### High-level facilities
  98.  
  99. gschar.$(OBJ): gschar.c $(GXERR) \
  100.   gxfixed.h gxarith.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gstype1.h gspath.h gzpath.h gzcolor.h gzstate.h
  101.  
  102. gschar0.$(OBJ): gschar0.c $(GXERR) \
  103.   gxfixed.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gzstate.h
  104.  
  105. gscolor.$(OBJ): gscolor.c $(GXERR) \
  106.   gxfixed.h gxmatrix.h gxdevice.h gzstate.h gzcolor.h gzht.h
  107.  
  108. gscoord.$(OBJ): gscoord.c $(GXERR) \
  109.   gxfixed.h gxmatrix.h gzdevice.h gzstate.h gscoord.h
  110.  
  111. gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  112.   gxfixed.h gxmatrix.h gxbitmap.h gxdevmem.h gzstate.h gzdevice.h
  113.  
  114. gsfile.$(OBJ): gsfile.c $(GXERR) \
  115.   gsmatrix.h gxdevice.h gxdevmem.h
  116.  
  117. gsfont.$(OBJ): gsfont.c $(GXERR) \
  118.   gxdevice.h gxfixed.h gxmatrix.h gxfont.h gxfdir.h gzstate.h
  119.  
  120. gsimage.$(OBJ): gsimage.c $(GXERR) \
  121.   arch.h gxfixed.h gxarith.h gxmatrix.h gspaint.h gzcolor.h gzdevice.h gzpath.h gzstate.h gximage.h
  122.  
  123. gsim2out.$(OBJ): gsim2out.c $(GXERR) \
  124.   gsstate.h gsmatrix.h gscoord.h gxfixed.h gxtype1.h
  125.  
  126. gsline.$(OBJ): gsline.c $(GXERR) \
  127.   gxfixed.h gxmatrix.h gzstate.h gzline.h
  128.  
  129. gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  130.   gxfixed.h gxarith.h gxmatrix.h
  131.  
  132. gsmisc.$(OBJ): gsmisc.c $(GX)
  133.  
  134. gspaint.$(OBJ): gspaint.c $(GX) \
  135.   gxfixed.h gxmatrix.h gspaint.h gzpath.h gzstate.h gzdevice.h gximage.h
  136.  
  137. gspath.$(OBJ): gspath.c $(GXERR) \
  138.   gxfixed.h gxmatrix.h gxpath.h gzstate.h
  139.  
  140. gspath2.$(OBJ): gspath2.c $(GXERR) \
  141.   gspath.h gxfixed.h gxmatrix.h gzstate.h gzpath.h gzdevice.h
  142.  
  143. gsstate.$(OBJ): gsstate.c $(GXERR) \
  144.   gxfixed.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzht.h gzline.h gzpath.h
  145.  
  146. gstdev.$(OBJ): gstdev.c $(GX) \
  147.   gxbitmap.h gxdevice.h gxfixed.h gxmatrix.h
  148.  
  149. gstype1.$(OBJ): gstype1.c $(GXERR) \
  150.   gxarith.h gxfixed.h gxmatrix.h gxchar.h gxdevmem.h gxop1.h gxtype1.h \
  151.   gzstate.h gzdevice.h gzpath.h
  152.  
  153. ###### Low-level facilities
  154.  
  155. ### Nested include files
  156.  
  157. gsstate.h: gscolor.h
  158.     touch gsstate.h
  159.  
  160. gxchar.h: gschar.h
  161.     touch gxchar.h
  162.  
  163. gxfont.h: gsfont.h
  164.     touch gxfont.h
  165.  
  166. gxmatrix.h: gsmatrix.h
  167.     touch gxmatrix.h
  168.  
  169. gxtype1.h: gstype1.h
  170.     touch gxtype1.h
  171.  
  172. gzcolor.h: gscolor.h
  173.     touch gzcolor.h
  174.  
  175. gzdevice.h: gxdevice.h
  176.     touch gzdevice.h
  177.  
  178. gzpath.h: gxpath.h
  179.     touch gzpath.h
  180.  
  181. gzstate.h: gsstate.h
  182.     touch gzstate.h
  183.  
  184. ### Executable code
  185.  
  186. gxcache.$(OBJ): gxcache.c $(GXERR) \
  187.   gxfixed.h gxmatrix.h gspaint.h gzdevice.h gzcolor.h gxdevmem.h gxfont.h gxfdir.h gxchar.h gzstate.h gzpath.h
  188.  
  189. gxclist.$(OBJ): gxclist.c $(GXERR) \
  190.   gsmatrix.h gxbitmap.h gxclist.h gxdevice.h gxdevmem.h
  191.  
  192. gxcolor.$(OBJ): gxcolor.c $(GXERR) \
  193.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzht.h gzstate.h
  194.  
  195. gxdither.$(OBJ): gxdither.c $(GX) \
  196.   gxfixed.h gxmatrix.h gzstate.h gzdevice.h gzcolor.h gzht.h
  197.  
  198. gxdraw.$(OBJ): gxdraw.c $(GX) \
  199.   gxfixed.h gxmatrix.h gxbitmap.h gzcolor.h gzdevice.h gzstate.h
  200.  
  201. gxfill.$(OBJ): gxfill.c $(GXERR) \
  202.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzpath.h gzstate.h
  203.  
  204. gxht.$(OBJ): gxht.c $(GXERR) \
  205.   gxfixed.h gxmatrix.h gxbitmap.h gzstate.h gzcolor.h gzdevice.h gzht.h
  206.  
  207. gxpath.$(OBJ): gxpath.c $(GXERR) \
  208.   gxfixed.h gzpath.h
  209.  
  210. gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  211.   gxfixed.h gxarith.h gzpath.h
  212.  
  213. gxstroke.$(OBJ): gxstroke.c $(GXERR) \
  214.   gxfixed.h gxarith.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzline.h gzpath.h
  215.  
  216. ###### The "memory" device
  217.  
  218. gdevmem.$(OBJ): gdevmem.c $(AK) \
  219.   gs.h arch.h gxbitmap.h gsmatrix.h gxdevice.h gxdevmem.h
  220.  
  221. ###### Files dependent on the set of installed devices.
  222. ###### Generating gconfig.h also generates gconfig.tr.
  223.  
  224. gconfig.h gconfig.tr: gdevs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS)
  225.     .$(DS)gsconfig $(DEVICES) + $(FEATURES)
  226.  
  227. gconfig.$(OBJ): gconfig.c $(AK) gconfig.h $(MAKEFILE)
  228.     $(CC0) -DGS_LIB_DEFAULT=$(Q)$(GS_LIB_DEFAULT)$(Q) -DGS_INIT=$(Q)$(GS_INIT)$(Q) gconfig.c
  229.  
  230. ###### On Unix, we pre-link all of the library except the back end.
  231. ###### On MS-DOS, we have to do the whole thing at once.
  232.  
  233. LIB=gschar.$(OBJ) gschar0.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
  234.  gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) \
  235.  gsimage.$(OBJ) gsim2out.$(OBJ) \
  236.  gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  237.  gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
  238.  gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) \
  239.  gxcache.$(OBJ) gxclist.$(OBJ) gxcolor.$(OBJ) \
  240.  gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  241.  gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \
  242.  gdevmem.$(OBJ) gconfig.$(OBJ)
  243.  
  244. # ------------------------------ Interpreter ------------------------------ #
  245.  
  246. ###### Utilities
  247.  
  248. GH=$(AK) ghost.h
  249.  
  250. ialloc.$(OBJ): ialloc.c $(AK) gs.h alloc.h astate.h
  251.  
  252. idebug.$(OBJ): idebug.c $(GH) \
  253.  iutil.h dict.h name.h ostack.h opdef.h packed.h store.h
  254.  
  255. idict.$(OBJ): idict.c $(GH) alloc.h errors.h name.h save.h store.h dict.h
  256.  
  257. iinit.$(OBJ): iinit.c $(GH) alloc.h dict.h errors.h name.h oper.h store.h
  258.  
  259. iname.$(OBJ): iname.c $(GH) alloc.h errors.h name.h store.h
  260.  
  261. isave.$(OBJ): isave.c $(GH) alloc.h astate.h name.h save.h store.h
  262.  
  263. iscan.$(OBJ): iscan.c $(GH) arch.h alloc.h dict.h errors.h iutil.h \
  264.  name.h ostack.h packed.h store.h stream.h scanchar.h
  265.  
  266. iutil.$(OBJ): iutil.c $(GH) \
  267.  errors.h alloc.h iutil.h name.h ostack.h oper.h store.h \
  268.  gsmatrix.h gxdevice.h gzcolor.h
  269.  
  270. stream.$(OBJ): stream.c $(AK) std.h stream.h scanchar.h gxfixed.h gstype1.h
  271.  
  272. ###### Operators
  273.  
  274. ghost.h: gx.h
  275.     touch ghost.h
  276.  
  277. oper.h: iutil.h opdef.h ostack.h
  278.     touch oper.h
  279.  
  280. OP=$(GH) errors.h oper.h ostack.h
  281.  
  282. ### Non-graphics operators
  283.  
  284. zarith.$(OBJ): zarith.c $(OP) store.h
  285.  
  286. zarray.$(OBJ): zarray.c $(OP) alloc.h packed.h store.h
  287.  
  288. zcontrol.$(OBJ): zcontrol.c $(OP) estack.h iutil.h store.h
  289.  
  290. zdict.$(OBJ): zdict.c $(OP) dict.h store.h
  291.  
  292. zfile.$(OBJ): zfile.c $(OP) gp.h \
  293.   alloc.h estack.h file.h iutil.h save.h stream.h store.h
  294.  
  295. zfileio.$(OBJ): zfileio.c $(OP) \
  296.   estack.h file.h store.h stream.h \
  297.   gsmatrix.h gxdevice.h gxdevmem.h
  298.  
  299. zgeneric.$(OBJ): zgeneric.c $(OP) dict.h estack.h name.h packed.h store.h
  300.  
  301. zmath.$(OBJ): zmath.c $(OP) store.h
  302.  
  303. zmisc.$(OBJ): zmisc.c $(OP) gp.h alloc.h dict.h name.h packed.h store.h \
  304.   gstype1.h gxfixed.h
  305.  
  306. zpacked.$(OBJ): zpacked.c $(OP) \
  307.   arch.h alloc.h dict.h name.h packed.h save.h store.h
  308.  
  309. zrelbit.$(OBJ): zrelbit.c $(OP) store.h dict.h
  310.  
  311. zstack.$(OBJ): zstack.c $(OP) store.h
  312.  
  313. zstring.$(OBJ): zstring.c $(OP) alloc.h iutil.h name.h store.h stream.h
  314.  
  315. ztype.$(OBJ): ztype.c $(OP) dict.h iutil.h name.h stream.h store.h
  316.  
  317. zvmem.$(OBJ): zvmem.c $(OP) alloc.h estack.h save.h state.h store.h \
  318.   gsmatrix.h gsstate.h
  319.  
  320. ###### Graphics operators
  321.  
  322. 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
  323.  
  324. zcolor.$(OBJ): zcolor.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h gzcolor.h iutil.h state.h store.h
  325.  
  326. zdevice.$(OBJ): zdevice.c $(OP) alloc.h state.h gsmatrix.h gsstate.h gxdevice.h store.h
  327.  
  328. zfont.$(OBJ): zfont.c $(OP) gsmatrix.h gxdevice.h gxfont.h gxfdir.h \
  329.  alloc.h font.h dict.h name.h packed.h save.h state.h store.h
  330.  
  331. zfont0.$(OBJ): zfont0.c $(OP) gsmatrix.h gxdevice.h gxfont.h \
  332.  alloc.h font.h dict.h name.h state.h store.h
  333.  
  334. zfont2.$(OBJ): zfont2.c $(OP) gsmatrix.h gxdevice.h gschar.h gxfixed.h gxfont.h \
  335.  alloc.h dict.h font.h name.h packed.h store.h
  336.  
  337. zgstate.$(OBJ): zgstate.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  338.  
  339. zht.$(OBJ): zht.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h state.h store.h
  340.  
  341. zmatrix.$(OBJ): zmatrix.c $(OP) gsmatrix.h state.h gscoord.h store.h
  342.  
  343. zpaint.$(OBJ): zpaint.c $(OP) alloc.h estack.h gsmatrix.h gspaint.h state.h store.h
  344.  
  345. zpath.$(OBJ): zpath.c $(OP) gsmatrix.h gspath.h state.h store.h
  346.  
  347. zpath2.$(OBJ): zpath2.c $(OP) alloc.h estack.h gspath.h state.h store.h
  348.  
  349. ###### Linking
  350.  
  351. INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) iinit.$(OBJ) iname.$(OBJ) \
  352.  interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) stream.$(OBJ) \
  353.  zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
  354.  zfile.$(OBJ) zfileio.$(OBJ) zgeneric.$(OBJ) \
  355.  zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zrelbit.$(OBJ) \
  356.  zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  357.  zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont0.$(OBJ) zfont2.$(OBJ) \
  358.  zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
  359.  zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  360.  
  361. # ----------------------------- Main program ------------------------------ #
  362.  
  363. # Utilities shared between platforms
  364.  
  365. gsmain.$(OBJ): gsmain.c $(GX) \
  366.   gp.h gsmatrix.h gxdevice.h
  367.  
  368. # The default font
  369.  
  370. uglyr.gsf: ugly10.bdf bdftops.ps gs$(XE)
  371.     .$(DS)gs -q -dNODISPLAY -- bdftops.ps ugly10.bdf uglyr.gsf
  372.  
  373. # Interpreter main program
  374.  
  375. interp.$(OBJ): interp.c $(GH) \
  376.   errors.h estack.h name.h dict.h oper.h ostack.h packed.h save.h store.h stream.h
  377.     $(CCINT) interp.c
  378.  
  379. gs.$(OBJ): gs.c $(GH) alloc.h estack.h ostack.h store.h stream.h
  380.