home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / ghostscr / unix_gcc.mak < prev    next >
Encoding:
Makefile  |  1991-02-04  |  24.2 KB  |  740 lines

  1. #    Copyright (C) 1989, 1990 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. # Choose generic configuration options.
  35.  
  36. # -DDEBUG
  37. #    includes debugging features (-Z switch) in the code.
  38. #      Code runs substantially slower even if no debugging switches
  39. #      are set.
  40. # -DNOPRIVATE
  41. #    makes private (static) procedures and variables public,
  42. #      so they are visible to the debugger and profiler.
  43. #      No execution time or space penalty.
  44.  
  45. GENOPT=
  46.  
  47. # ------ Platform-specific options ------ #
  48.  
  49. # Define the name of the C compiler.
  50.  
  51. CC=gcc
  52.  
  53. # Define the other compilation flags.
  54. # Add -DBSD4_2 for 4.2bsd systems.
  55. # Add -DUSG (GNU convention) or -DSYSV for System V.
  56. # We don't include -ansi, because this gets in the way of the platform-
  57. #   specific stuff that <math.h> typically needs.
  58.  
  59. CFLAGS=-g -O
  60.  
  61. # Define platform flags for ld.
  62. # Most Unix systems accept -X, but some don't.
  63. # Sun OS4.n needs -Bstatic.
  64.  
  65. LDPLAT=-X
  66.  
  67. # Define any extra libraries to link into the executable.
  68. # The default is for X Windows.
  69.  
  70. EXTRALIBS= -lX11
  71.  
  72. # Define the installation commands and target directories for
  73. # executables and files.  Only relevant to `make install'.  If you don't
  74. # have GNU install (part of the fileutils distribution), use cp.
  75.  
  76. proginstall = install -m 775
  77. fileinstall = install -m 664
  78. bindir = /usr/local/gnu/bin
  79. libdir = /usr/local/gnu/lib/ghostscript
  80.  
  81. # --------------------------- Choice of devices --------------------------- #
  82.  
  83. # Choose the device(s) to include.  See gdevs.mak for details.
  84.  
  85. DEVICES=x11
  86. DEVICE_OBJS=$(x11_)
  87.  
  88. # ---------------------------- End of options --------------------------- #
  89.  
  90. # Define the name of the makefile -- used in dependencies.
  91.  
  92. MAKEFILE=unix-gcc.mak
  93.  
  94. # Define the extensions for the object and executable files.
  95.  
  96. OBJ=o
  97. XE=
  98.  
  99. # Define the ANSI-to-K&R dependency.  (gcc accepts ANSI syntax.)
  100.  
  101. AK=
  102.  
  103. # Define the directory separator and shell quote string.
  104.  
  105. DS=/
  106. Q=\"
  107.  
  108. # Define the compilation rules.
  109.  
  110. CCFLAGS=$(GENOPT) $(CFLAGS)
  111.  
  112. .c.o:
  113.     $(CC) $(CCFLAGS) -c $*.c
  114.  
  115. CCA=$(CC) $(CCFLAGS) -c
  116. CCNA=$(CCA)
  117. CCINT=$(CCA)
  118.  
  119. # --------------------------- Generic makefile ---------------------------- #
  120.  
  121. # The remainder of the makefile (ghost.mak, gdevs.mak, and unixtail.mak)
  122. # is generic.  tar_gs concatenates all these together.
  123. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  124. #    Distributed by Free Software Foundation, Inc.
  125. #
  126. # This file is part of Ghostscript.
  127. #
  128. # Ghostscript is distributed in the hope that it will be useful, but
  129. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  130. # to anyone for the consequences of using it or for whether it serves any
  131. # particular purpose or works at all, unless he says so in writing.  Refer
  132. # to the Ghostscript General Public License for full details.
  133. #
  134. # Everyone is granted permission to copy, modify and redistribute
  135. # Ghostscript, but only under the conditions described in the Ghostscript
  136. # General Public License.  A copy of this license is supposed to have been
  137. # given to you along with Ghostscript so you can know your rights and
  138. # responsibilities.  It should be in a file named COPYING.  Among other
  139. # things, the copyright notice and this notice must be preserved on all
  140. # copies.
  141.  
  142. # Generic makefile for Ghostscript.
  143. # The platform-specific makefiles 'include' this file.
  144. # They define the following symbols:
  145. #    GS_LIB_DEFAULT - the default directory/ies for searching for the
  146. #        initialization and font files at run time.
  147. #    Q - the string that causes the shell to pass a " to a program
  148. #        (" on MS-DOS, \" on Unix).
  149. #    XE - the extension for executable files (e.g., null or .exe).
  150. #    OBJ - the extension for relocatable object files (e.g., o or obj).
  151. #    CCA - the ANSI C invocation for normal compilation.
  152. #    CCNA - the non-ANSI C invocation for files that on some platforms
  153. #        include in-line assembly code or other non-standard
  154. #        constructs.  Currently this is needed on every file that
  155. #        includes sstorei.h, and a few files that use Turbo C
  156. #        "short pointer" constructs.
  157. #    CCINT - the C invocation for compiling the main interpreter module,
  158. #        normally the same as CCNA: this is needed because the
  159. #        Borland compiler generates *worse* code for this module
  160. #        (but only this module) when optimization (-O) is turned on.
  161. #    AK - if source files must be converted from ANSI to K&R syntax,
  162. #        this is ansi2knr$(XE); if not, it is null.
  163. #    DS - the directory separator (/ or \).
  164. # The platform-specific makefiles must also include rules for creating
  165. #   ansi2knr$(XE) and genarch$(XE) from the corresponding .c files,
  166. #   and for making arch.h by executing genarch$(XE).  (This
  167. #   shouldn't really be necessary, but Turbo C and Unix C treat the -o
  168. #   switch slightly differently (Turbo C requires no following space,
  169. #   Unix C requires a following space), and I haven't found a way to capture
  170. #   the difference in a macro; also, Unix requires ./ because . may not be
  171. #   in the search path, whereas MS-DOS always looks in the current
  172. #   directory first.)
  173.  
  174. default: gs$(XE)
  175.  
  176. test: gt$(XE)
  177.  
  178. clean:
  179.     rm -f *.$(OBJ) *.a core gmon.out
  180.     rm -f *.dev gdevs.h gdevs.tl
  181.     rm -f t _temp_* _temp_*.* libc*.tl *.map *.sym
  182.     rm -f ansi2knr$(XE) genarch$(XE) arch.h gs$(XE)
  183.  
  184. # Note: Unix uses malloc.h and memory.h;
  185. # Turbo C uses alloc.h, stdlib.h, and mem.h.
  186. # 4.2bsd uses strings.h; other systems use string.h.
  187. # gcc on VMS doesn't have a math.h.
  188. # We handle this by using local include files called
  189. # malloc_.h, math_.h, memory_.h, and string_.h
  190. # that perform appropriate indirection.
  191.  
  192. # Auxiliary programs
  193.  
  194. arch.h: genarch$(XE)
  195.     .$(DS)genarch
  196.  
  197. # -------------------------------- Library -------------------------------- #
  198.  
  199. GX=$(AK) std.h gx.h
  200. GXERR=$(GX) gserrors.h
  201.  
  202. ###### High-level facilities
  203.  
  204. gschar.$(OBJ): gschar.c $(GXERR) \
  205.   gxfixed.h gxarith.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gstype1.h gzpath.h gzcolor.h gzstate.h
  206.  
  207. gscolor.$(OBJ): gscolor.c $(GXERR) \
  208.   gxfixed.h gxmatrix.h gxdevice.h gzstate.h gzcolor.h gzht.h
  209.  
  210. gscoord.$(OBJ): gscoord.c $(GXERR) \
  211.   gxfixed.h gxmatrix.h gzdevice.h gzstate.h gscoord.h
  212.  
  213. gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  214.   gxfixed.h gxmatrix.h gxbitmap.h gxdevmem.h gzstate.h gzdevice.h
  215.  
  216. gsfile.$(OBJ): gsfile.c $(GXERR) \
  217.   gsmatrix.h gxdevice.h gxdevmem.h
  218.  
  219. gsfont.$(OBJ): gsfont.c $(GXERR) \
  220.   gxdevice.h gxfixed.h gxmatrix.h gxfont.h gxfdir.h gzstate.h
  221.  
  222. gsimage.$(OBJ): gsimage.c $(GXERR) \
  223.   arch.h gxfixed.h gxarith.h gxmatrix.h gspaint.h gzcolor.h gzdevice.h gzpath.h gzstate.h gximage.h
  224.  
  225. gsim2out.$(OBJ): gsim2out.c $(GXERR) \
  226.   gsstate.h gsmatrix.h gscoord.h gxfixed.h gxtype1.h
  227.  
  228. gsline.$(OBJ): gsline.c $(GXERR) \
  229.   gxfixed.h gxmatrix.h gzstate.h gzline.h
  230.  
  231. gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  232.   gxfixed.h gxarith.h gxmatrix.h
  233.  
  234. gsmisc.$(OBJ): gsmisc.c $(GX)
  235.  
  236. gspaint.$(OBJ): gspaint.c $(GX) \
  237.   gxfixed.h gxmatrix.h gspaint.h gzpath.h gzstate.h gzdevice.h gximage.h
  238.  
  239. gspath.$(OBJ): gspath.c $(GXERR) \
  240.   gxfixed.h gxmatrix.h gxpath.h gzstate.h
  241.  
  242. gspath2.$(OBJ): gspath2.c $(GXERR) \
  243.   gspath.h gxfixed.h gxmatrix.h gzstate.h gzpath.h gzdevice.h
  244.  
  245. gsstate.$(OBJ): gsstate.c $(GXERR) \
  246.   gxfixed.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzht.h gzline.h gzpath.h
  247.  
  248. gstype1.$(OBJ): gstype1.c $(GXERR) \
  249.   gxarith.h gxfixed.h gxmatrix.h gxchar.h gxdevmem.h gxtype1.h gxfont1.h gzstate.h gzdevice.h gzpath.h
  250.  
  251. ###### Low-level facilities
  252.  
  253. gxcache.$(OBJ): gxcache.c $(GX) \
  254.   gserrors.h gxfixed.h gxmatrix.h gspaint.h gzdevice.h gzcolor.h gxdevmem.h gxfont.h gxfdir.h gxchar.h gzstate.h gzpath.h
  255.  
  256. gxcolor.$(OBJ): gxcolor.c $(GX) \
  257.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzht.h
  258.  
  259. gxdither.$(OBJ): gxdither.c $(GX) \
  260.   gxfixed.h gxmatrix.h gzstate.h gzdevice.h gzcolor.h gzht.h
  261.  
  262. gxdraw.$(OBJ): gxdraw.c $(GX) \
  263.   gxfixed.h gxmatrix.h gxbitmap.h gzcolor.h gzdevice.h gzstate.h
  264.  
  265. gxfill.$(OBJ): gxfill.c $(GXERR) \
  266.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzpath.h gzstate.h
  267.  
  268. gxht.$(OBJ): gxht.c $(GXERR) \
  269.   gxfixed.h gxmatrix.h gxbitmap.h gzstate.h gzcolor.h gzdevice.h gzht.h
  270.  
  271. gxpath.$(OBJ): gxpath.c $(GXERR) \
  272.   gxfixed.h gzpath.h
  273.  
  274. gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  275.   gxfixed.h gxarith.h gzpath.h
  276.  
  277. gxstroke.$(OBJ): gxstroke.c $(GXERR) \
  278.   gxfixed.h gxarith.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzline.h gzpath.h
  279.  
  280. ###### The "memory" device
  281.  
  282. gdevmem.$(OBJ): gdevmem.c $(AK) \
  283.   gs.h arch.h gxbitmap.h gsmatrix.h gxdevice.h gxdevmem.h
  284.     $(CCNA) gdevmem.c
  285.  
  286. ###### Files dependent on the set of installed devices.
  287. ###### Generating gdevs.h also generates gdevs.tl.
  288.  
  289. gdevs.h: gdevs.mak $(MAKEFILE) makefile
  290.     .$(DS)gsconfig $(DEVICES)
  291.  
  292. gdevs.$(OBJ): gdevs.c $(AK) gdevs.h
  293.  
  294. ###### On Unix, we pre-link all of the library except the back end.
  295. ###### On MS-DOS, we have to do the whole thing at once.
  296.  
  297. LIB=gschar.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) gsdevice.$(OBJ) \
  298.  gsfile.$(OBJ) gsfont.$(OBJ) gsimage.$(OBJ) gsim2out.$(OBJ) \
  299.  gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  300.  gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) gsstate.$(OBJ) gstype1.$(OBJ) \
  301.  gxcache.$(OBJ) gxcolor.$(OBJ) gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  302.  gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \
  303.  gdevmem.$(OBJ) gdevs.$(OBJ)
  304.  
  305. # ------------------------------ Interpreter ------------------------------ #
  306.  
  307. ###### Utilities
  308.  
  309. GH=$(AK) ghost.h
  310.  
  311. ialloc.$(OBJ): ialloc.c $(AK) std.h alloc.h
  312.     $(CCNA) ialloc.c
  313.  
  314. idebug.$(OBJ): idebug.c $(GH) name.h
  315.  
  316. idict.$(OBJ): idict.c $(GH) alloc.h errors.h name.h store.h dict.h
  317.  
  318. iinit.$(OBJ): iinit.c $(GH) dict.h oper.h store.h
  319.  
  320. iname.$(OBJ): iname.c $(GH) alloc.h errors.h name.h store.h
  321.  
  322. iscan.$(OBJ): iscan.c $(GH) arch.h alloc.h dict.h errors.h name.h store.h stream.h scanchar.h
  323.  
  324. iutil.$(OBJ): iutil.c $(GH) errors.h alloc.h oper.h store.h gsmatrix.h gxdevice.h gzcolor.h
  325.  
  326. stream.$(OBJ): stream.c $(AK) std.h stream.h scanchar.h gxfixed.h gstype1.h
  327.  
  328. ###### Non-graphics operators
  329.  
  330. OP=$(GH) errors.h oper.h
  331.  
  332. zarith.$(OBJ): zarith.c $(OP) store.h
  333.  
  334. zarray.$(OBJ): zarray.c $(OP) alloc.h store.h sstorei.h
  335.     $(CCNA) zarray.c
  336.  
  337. zcontrol.$(OBJ): zcontrol.c $(OP) estack.h store.h sstorei.h
  338.     $(CCNA) zcontrol.c
  339.  
  340. zdict.$(OBJ): zdict.c $(OP) dict.h store.h
  341.  
  342. zfile.$(OBJ): zfile.c $(OP) alloc.h stream.h store.h gsmatrix.h gxdevice.h gxdevmem.h
  343.  
  344. zgeneric.$(OBJ): zgeneric.c $(OP) dict.h estack.h store.h
  345.  
  346. zmath.$(OBJ): zmath.c $(OP) store.h
  347.  
  348. zmisc.$(OBJ): zmisc.c $(OP) alloc.h dict.h store.h gstype1.h gxfixed.h
  349.  
  350. zpacked.$(OBJ): zpacked.c $(OP) store.h
  351.  
  352. zrelbit.$(OBJ): zrelbit.c $(OP) store.h sstorei.h dict.h
  353.     $(CCNA) zrelbit.c
  354.  
  355. zstack.$(OBJ): zstack.c $(OP) store.h sstorei.h
  356.     $(CCNA) zstack.c
  357.  
  358. zstring.$(OBJ): zstring.c $(OP) alloc.h store.h stream.h
  359.  
  360. ztype.$(OBJ): ztype.c $(OP) dict.h name.h stream.h store.h
  361.  
  362. zvmem.$(OBJ): zvmem.c $(OP) alloc.h state.h store.h gsmatrix.h gsstate.h
  363.  
  364. ###### Graphics operators
  365.  
  366. zchar.$(OBJ): zchar.c $(OP) gxmatrix.h gschar.h gstype1.h gxdevice.h gxfixed.h gxfont.h gxfont1.h gzpath.h gzstate.h alloc.h dict.h font.h estack.h state.h store.h
  367.  
  368. zcolor.$(OBJ): zcolor.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  369.  
  370. zdevice.$(OBJ): zdevice.c $(OP) alloc.h state.h gsmatrix.h gsstate.h gxdevice.h store.h
  371.  
  372. zfont.$(OBJ): zfont.c $(OP) gsmatrix.h gxdevice.h gxfont.h gxfont1.h alloc.h font.h dict.h name.h state.h store.h
  373.  
  374. zgstate.$(OBJ): zgstate.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  375.  
  376. zht.$(OBJ): zht.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h state.h store.h
  377.  
  378. zmatrix.$(OBJ): zmatrix.c $(OP) gsmatrix.h state.h gscoord.h store.h
  379.  
  380. zpaint.$(OBJ): zpaint.c $(OP) alloc.h estack.h gsmatrix.h gspaint.h state.h store.h
  381.  
  382. zpath.$(OBJ): zpath.c $(OP) gsmatrix.h gspath.h state.h store.h
  383.  
  384. zpath2.$(OBJ): zpath2.c $(OP) alloc.h estack.h gspath.h state.h store.h
  385.  
  386. ###### Linking
  387.  
  388. INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) iinit.$(OBJ) iname.$(OBJ) \
  389.  interp.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) stream.$(OBJ) \
  390.  zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) zfile.$(OBJ) \
  391.  zgeneric.$(OBJ) zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zrelbit.$(OBJ) \
  392.  zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  393.  zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zdevice.$(OBJ) zgstate.$(OBJ) \
  394.  zht.$(OBJ) zmatrix.$(OBJ) zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  395.  
  396. # ----------------------------- Main program ------------------------------ #
  397.  
  398. # Utilities shared between platforms
  399.  
  400. gsmain.$(OBJ): gsmain.c $(GX) \
  401.   gsmatrix.h gxdevice.h
  402.  
  403. # Library test program driver
  404.  
  405. gt.$(OBJ): gt.c $(GX) \
  406.   gsmatrix.h gsstate.h gscoord.h gspaint.h gspath.h gxdevice.h
  407.  
  408. # Interpreter main program
  409.  
  410. interp.$(OBJ): interp.c $(GH) \
  411.   errors.h name.h dict.h oper.h store.h sstorei.h stream.h
  412.     $(CCINT) interp.c
  413.  
  414. gs.$(OBJ): gs.c $(GH) alloc.h store.h stream.h $(MAKEFILE)
  415.     $(CCA) -DGS_LIB_DEFAULT=$(Q)$(GS_LIB_DEFAULT)$(Q) gs.c
  416. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  417. #    Distributed by Free Software Foundation, Inc.
  418. #
  419. # This file is part of Ghostscript.
  420. #
  421. # Ghostscript is distributed in the hope that it will be useful, but
  422. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  423. # to anyone for the consequences of using it or for whether it serves any
  424. # particular purpose or works at all, unless he says so in writing.  Refer
  425. # to the Ghostscript General Public License for full details.
  426. #
  427. # Everyone is granted permission to copy, modify and redistribute
  428. # Ghostscript, but only under the conditions described in the Ghostscript
  429. # General Public License.  A copy of this license is supposed to have been
  430. # given to you along with Ghostscript so you can know your rights and
  431. # responsibilities.  It should be in a file named COPYING.  Among other
  432. # things, the copyright notice and this notice must be preserved on all
  433. # copies.
  434.  
  435. # makefile for Ghostscript device drivers.
  436.  
  437. # -------------------------------- Catalog ------------------------------- #
  438.  
  439. # It is possible to build Ghostscript with an arbitrary collection of
  440. # device drivers, although many drivers are supported only on a subset
  441. # of the target platforms.  The currently available drivers are:
  442.  
  443. # Displays:
  444. #    bgi    Borland Graphics Interface   [MS-DOS only]
  445. #    ega    EGA display   [MS-DOS only]
  446. #    ega_bios  EGA display using BIOS calls (very slow)   [MS-DOS only]
  447. #    mdb10    EIZO MDB-10 display (1024 x 768)   [MS-DOS only]
  448. #    sonyfb    Sony Microsystems monochrome display   [Sony only]
  449. #    sunview  SunView window system   [SunOS only]
  450. #    vga    VGA display   [MS-DOS only]
  451. #    x11    X Windows version 11, release >=3   [Unix only]
  452. # (NOTE: no more than one MS-DOS display driver may be included in
  453. #   any build.)
  454. # Printers:
  455. #    bj10e    Canon BubbleJet BJ10e  [MS-DOS only]
  456. #    deskjet  H-P DeskJet   [MS-DOS & Unix]
  457. #    epson    Epson dot matrix printers   [MS-DOS only]
  458. #    laserjet  H-P LaserJet   [MS-DOS & Unix]
  459. #    nwp533  Sony Microsystems NWP533 laser printer   [Sony only]
  460. # ###    paintjet  H-P PaintJet color printer [Unix, tested on SunOS only]
  461. # ###      (NOT INCLUDED IN THIS RELEASE)
  462.  
  463. # If you add drivers, it would be nice if you kept each list
  464. # in alphabetical order.
  465.  
  466. # Each platform-specific makefile should contain a pair of lines of the form
  467. #    DEVICES=<dev1> ... <devn>
  468. #    DEVICE_OBJS=$(<dev1>_) ... $(<devn>_)
  469. # where dev1 ... devn are the devices to be included in the build.
  470. # dev1 will be used as the default device.  Don't forget the _s!
  471. # On MS-DOS platforms, the first of these lines must appear *before*,
  472. # and the second *after*, the lines
  473. #    (!)include gdevs.mak
  474. #    (!)include ghost.mak
  475. # in the makefile.  On Unix systems, the two device definition lines
  476. # may appear anywhere in the makefile.
  477. #
  478. # The executable must be linked with all the files named in DEVICE_OBJS.
  479. # On MS-DOS platforms, this is done by constructing a file called gdevs.tl,
  480. # to get around the limit on the length of a DOS command line.
  481.  
  482. # ---------------------------- End of catalog ---------------------------- #
  483.  
  484. # If you want to add a new device driver, the examples below should be
  485. # enough of a guide to the correct form for the makefile rules.
  486.  
  487. # All device drivers depend on the following
  488. # (note that we include some indirect dependencies explicitly):
  489.  
  490. GDEV=$(AK) gs.h gx.h gsmatrix.h gxbitmap.h gxdevice.h
  491.  
  492. ###### ------------------- MS-DOS display devices ------------------- ######
  493.  
  494. GDEVPCFB=gdevpcfb.h $(GDEV)
  495.  
  496. gdevegaa.$(OBJ): gdevegaa.asm
  497.  
  498. ### -------------------------- The EGA device -------------------------- ###
  499.  
  500. ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_)
  501. ega.exe: $(ETEST) libc$(MM).tl
  502.     tlink /m /l $(LIBDIR)\c0$(MM) @ega.tl @libc$(MM).tl
  503.  
  504. ega.$(OBJ): ega.c $(GDEV)
  505.  
  506. ega_=gdevega.$(OBJ) gdevegaa.$(OBJ)
  507. ega.dev: $(ega_)
  508.     .$(DS)gssetdev ega.dev $(ega_)
  509.  
  510. gdevega.$(OBJ): gdevpcfb.c gdevega.h $(GDEVPCFB)
  511.     cp gdevega.h gdevxxfb.h
  512.     $(CCNA) gdevpcfb.c
  513.     rm gdevxxfb.h
  514.     cp gdevpcfb.obj gdevega.obj
  515.  
  516. ega_bios_=gdevegab.$(OBJ) gdevegaa.$(OBJ)
  517. ega_bios.dev: $(ega_bios_)
  518.     .$(DS)gssetdev ega_bios.dev $(ega_bios_)
  519.  
  520. gdevegab.$(OBJ): gdevegab.c $(GDEVPCFB)
  521.     $(CCNA) $(D_EGA) gdevegab.c
  522.  
  523. ### -------------------------- The VGA device -------------------------- ###
  524.  
  525. vga_=gdevvga.$(OBJ) gdevegaa.$(OBJ)
  526. vga.dev: $(vga_)
  527.     .$(DS)gssetdev vga.dev $(vga_)
  528.  
  529. gdevvga.$(OBJ): gdevpcfb.c gdevvga.h $(GDEVPCFB)
  530.     cp gdevvga.h gdevxxfb.h
  531.     $(CCNA) gdevpcfb.c
  532.     rm gdevxxfb.h
  533.     cp gdevpcfb.obj gdevvga.obj
  534.  
  535. ### ---------------------- The EIZO MDB-10 device ---------------------- ###
  536.  
  537. mdb10_=gdevmd10.$(OBJ) gdevegaa.$(OBJ)
  538. mdb10.dev: $(mdb10_)
  539.     .$(DS)gssetdev mdb10.dev $(mdb10_)
  540.  
  541. gdevmd10.$(OBJ): gdevpcfb.c gdevmd10.h $(GDEVPCFB)
  542.     cp gdevmd10.h gdevxxfb.h
  543.     $(CCNA) gdevpcfb.c
  544.     rm gdevxxfb.h
  545.     cp gdevpcfb.obj gdevmd10.obj
  546.  
  547. ###### --------- The BGI (Borland Graphics Interface) device -------- ######
  548.  
  549. bgi_=gdevbgi.$(OBJ) egavga.$(OBJ)
  550. bgi.dev: $(bgi_)
  551.     .$(DS)gssetdev bgi.dev $(bgi_)
  552.  
  553. gdevbgi.$(OBJ): gdevbgi.c $(GDEV)
  554.     $(CCNA) gdevbgi.c
  555.  
  556. egavga.$(OBJ): $(COMPDIR)\egavga.bgi
  557.     bgiobj egavga
  558.  
  559. ###### --------------- Memory-buffered printer devices --------------- ######
  560.  
  561. gvirtmem.$(OBJ): gvirtmem.c gvirtmem.h
  562.  
  563. # Virtual memory test program -- requires VMDEBUG
  564.  
  565. gvm.exe: gvirtmem.$(OBJ) trace.$(OBJ)
  566.     tlink /m /l $(LIBDIR)\c0$(MM) gvirtmem trace,gvm,gvm,$(LIBDIR)\c$(MM)
  567.  
  568. PDEVH=$(GDEV) gxdevmem.h gvirtmem.h gdevprn.h
  569.  
  570. # We use CCNA only because the MS-DOS version of the driver
  571. # refers to stdprn, which is non-ANSI.
  572. gdevprn.$(OBJ): gdevprn.c $(PDEVH)
  573.     $(CCNA) gdevprn.c
  574.  
  575. ### ----------------- The Canon BubbleJet BJ10e device ----------------- ###
  576.  
  577. bj10e_=gdevbj10.$(OBJ) gvirtmem.$(OBJ) gdevprn.$(OBJ)
  578. bj10e.dev: $(bj10e_)
  579.     .$(DS)gssetdev bj10e.dev $(bj10e_)
  580.  
  581. gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
  582.  
  583. ### ------------------ The H-P DeskJet printer device ------------------ ###
  584.  
  585. # Note that this shares code with the LaserJet device (below).
  586.  
  587. deskjet_=gdevdjet.$(OBJ) gvirtmem.$(OBJ) gdevprn.$(OBJ)
  588. deskjet.dev: $(deskjet_)
  589.     .$(DS)gssetdev deskjet.dev $(deskjet_)
  590.  
  591. gdevdjet.$(OBJ): gdevdjet.c $(PDEVH)
  592.     $(CCA) -DLASER=0 gdevdjet.c
  593.  
  594. ### ----------------- The generic Epson printer device ----------------- ###
  595.  
  596. epson_=gdevepsn.$(OBJ) gvirtmem.$(OBJ) gdevprn.$(OBJ)
  597. epson.dev: $(epson_)
  598.     .$(DS)gssetdev epson.dev $(epson_)
  599.  
  600. gdevepsn.$(OBJ): gdevepsn.c $(PDEVH)
  601.  
  602. ### ------------------ The H-P LaserJet printer device ----------------- ###
  603.  
  604. # Note that this shares code with the DeskJet device (above).
  605.  
  606. laserjet_=gdevljet.$(OBJ) gvirtmem.$(OBJ) gdevprn.$(OBJ)
  607. laserjet.dev: $(laserjet_)
  608.     .$(DS)gssetdev laserjet.dev $(laserjet_)
  609.  
  610. gdevljet.$(OBJ): gdevdjet.c $(PDEVH)
  611.     cp gdevdjet.c gdevljet.c
  612.     $(CCA) -DLASER=1 gdevljet.c
  613.     rm gdevljet.c
  614.  
  615. ### ------------ The H-P PaintJet color printer device ----------------- ###
  616. ### Note: this driver was contributed by users:                          ###
  617. ###       please contact marc@vlsi.polymtl.ca if you have questions.     ###
  618.  
  619. ### This driver was not ready to be included in release 2.0.
  620. ### Do not attempt to use it: the files are not included in the fileset.
  621.  
  622. PJETH=$(GDEV) gdevprn.h gdevpjet.h
  623.  
  624. paintjet_=gdevpjet.$(OBJ)
  625. paintjet.dev: $(paintjet_)
  626.     .$(DS)gssetdev paintjet.dev $(paintjet_)
  627.  
  628. gdevpjet.$(OBJ): gdevpjet.c $(PJETH)
  629.  
  630. ###### ------------------ Sony frame buffer device ----------------- ######
  631.  
  632. sonyfb_=gdevsnfb.$(OBJ) gvirtmem.$(OBJ) gdevprn.$(OBJ)
  633. sonyfb.dev: $(sonyfb_)
  634.     .$(DS)gssetdev sonyfb.dev $(sonyfb_)
  635.  
  636. gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
  637.     $(CCA) gdevsnfb.c
  638.  
  639. ###### ----------------- Sony NWP533 printer device ----------------- ######
  640.  
  641. nwp533_=gdevn533.$(OBJ) gvirtmem.$(OBJ) gdevprn.$(OBJ)
  642. nwp533.dev: $(nwp533_)
  643.     .$(DS)gssetdev nwp533.dev $(nwp533_)
  644.  
  645. gdevn533.$(OBJ): gdevn533.c $(PDEVH)
  646.     $(CCA) gdevn533.c
  647.  
  648. ###### --------------------- The SunView device --------------------- ######
  649.  
  650. sunview_=gdevsun.$(OBJ)
  651. sunview.dev: $(sunview_)
  652.     .$(DS)gssetdev sunview.dev $(sunview_)
  653.  
  654. gdevsun.$(OBJ): gdevsun.c $(GDEV)
  655.  
  656. ###### ----------------------- The X11 device ----------------------- ######
  657.  
  658. x11_=gdevx.$(OBJ)
  659. x11.dev: $(x11_)
  660.     .$(DS)gssetdev x11.dev $(x11_)
  661.  
  662. ### Note: if the X11 client header libraries are not on /usr/include/X11,
  663. ### you may have to change the compilation line below to add a -I switch.
  664. ### For example, if the header files are in /usr/local/X/include/X11,
  665. ### you must add the switch -I/usr/local/X/include.
  666. gdevx.$(OBJ): gdevx.c $(GDEV) gdevx.h
  667.     $(CCA) -I/usr/local/X/include gdevx.c
  668. #    Copyright (C) 1990, 1991 Aladdin Enterprises.  All rights reserved.
  669. #    Distributed by Free Software Foundation, Inc.
  670. #
  671. # This file is part of Ghostscript.
  672. #
  673. # Ghostscript is distributed in the hope that it will be useful, but
  674. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  675. # to anyone for the consequences of using it or for whether it serves any
  676. # particular purpose or works at all, unless he says so in writing.  Refer
  677. # to the Ghostscript General Public License for full details.
  678. #
  679. # Everyone is granted permission to copy, modify and redistribute
  680. # Ghostscript, but only under the conditions described in the Ghostscript
  681. # General Public License.  A copy of this license is supposed to have been
  682. # given to you along with Ghostscript so you can know your rights and
  683. # responsibilities.  It should be in a file named COPYING.  Among other
  684. # things, the copyright notice and this notice must be preserved on all
  685. # copies.
  686.  
  687. # Partial makefile for Ghostscript, common to all Unix configurations.
  688.  
  689. # This is the last part of the makefile for Unix configurations.
  690. # Since Unix make doesn't have an 'include' facility, we concatenate
  691. # the various parts of the makefile together by brute force (in tar_gs).
  692.  
  693. # -------------------------------- Library -------------------------------- #
  694.  
  695. ## The Unix platform
  696.  
  697. PLATUNIX=gp_unix.$(OBJ)
  698.  
  699. gp_unix.$(OBJ): gp_unix.c
  700.  
  701. # -------------------------- Auxiliary programs --------------------------- #
  702.  
  703. ansi2knr$(XE):
  704.     $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c
  705.  
  706. genarch$(XE): genarch.c
  707.     $(CC) -o genarch$(XE) $(CFLAGS) genarch.c
  708.  
  709. # ----------------------------- Main program ------------------------------ #
  710.  
  711. # (Dummy) tracing package
  712.  
  713. utrace.$(OBJ): utrace.c cframe_.h
  714.  
  715. # Main program
  716.  
  717. ALLUNIX=gsmain.$(OBJ) utrace.$(OBJ) $(LIB) $(PLATUNIX) $(DEVICE_OBJS)
  718.  
  719. # Library test programs
  720.  
  721. GTUNIX=gt.$(OBJ) $(ALLUNIX)
  722. gt: $(GTUNIX)
  723.     $(CC) $(CFLAGS) $(LDPLAT) -o gt $(GTUNIX) $(EXTRALIBS) -lm
  724.  
  725. # Interpreter main program
  726.  
  727. GSUNIX=gs.$(OBJ) $(INT) $(ALLUNIX)
  728. gs: $(GSUNIX)
  729.     $(CC) $(CFLAGS) $(LDPLAT) -o gs $(GSUNIX) $(EXTRALIBS) -lm
  730.  
  731. # Installation
  732.  
  733. sysps = ghost.ps gfonts.ps statusd.ps
  734. artps = chess.ps cheq.ps golfer.ps escher.ps
  735. utilps = decrypt.ps bdftops.ps pstoppm.ps fcutils.ps prfont.ps
  736.  
  737. install:
  738.     $(proginstall) gs gsnd bdftops $(bindir)
  739.     $(fileinstall) $(sysps) $(artps) $(utilps) $(libdir)
  740.