home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr2 / gs300sr2.exe / UNIXTAIL.MAK < prev    next >
Encoding:
Text File  |  1994-07-29  |  3.8 KB  |  100 lines

  1. #    Copyright (C) 1990, 1992, 1993, 1994 Aladdin Enterprises.  All rights reserved.
  2. # This file is part of Aladdin Ghostscript.
  3. # Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. # or distributor accepts any responsibility for the consequences of using it,
  5. # or for whether it serves any particular purpose or works at all, unless he
  6. # or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. # License (the "License") for full details.
  8. # Every copy of Aladdin Ghostscript must include a copy of the License,
  9. # normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. # the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. # under certain conditions described in the License.  Among other things, the
  12. # License requires that the copyright notice and this notice be preserved on
  13. # all copies.
  14.  
  15. # Partial makefile common to all Unix configurations.
  16.  
  17. # This is the last part of the makefile for Unix configurations.
  18. # Since Unix make doesn't have an 'include' facility, we concatenate
  19. # the various parts of the makefile together by brute force (in tar_cat).
  20.  
  21. # The following prevents GNU make from constructing argument lists that
  22. # include all environment variables, which can easily be longer than
  23. # brain-damaged system V allows.
  24.  
  25. .NOEXPORT:
  26.  
  27. # -------------------------------- Library -------------------------------- #
  28.  
  29. ## The Unix platforms
  30.  
  31. # We have to include a test for the existence of sys/time.h,
  32. # because some System V platforms don't have it.
  33.  
  34. # Unix platforms other than System V.
  35. unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ) gdevpipe.$(OBJ)
  36. unix_.dev: $(unix__)
  37.     $(SETMOD) unix_ $(unix__)
  38.     $(ADDMOD) unix_ -iodev pipe
  39.  
  40. gp_unix.$(OBJ): gp_unix.c $(AK) $(string__h) $(gx_h) $(gsexit_h) $(gp_h) \
  41.   $(time__h)
  42.  
  43. gdevpipe.$(OBJ): gdevpipe.c $(AK) $(stdio__h) \
  44.   $(gserror_h) $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(stream_h)
  45.  
  46. # System V platforms, which lack some system calls, but have pipes.
  47. sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ) gp_sysv.$(OBJ) gdevpipe.$(OBJ)
  48. sysv_.dev: $(sysv__)
  49.     $(SETMOD) sysv_ $(sysv__)
  50.     $(ADDMOD) sysv_ -iodev pipe
  51.  
  52. gp_sysv.$(OBJ): gp_sysv.c $(time__h) $(AK)
  53.  
  54. # -------------------------- Auxiliary programs --------------------------- #
  55.  
  56. ansi2knr$(XE): ansi2knr.c $(stdio__h) $(string__h) $(malloc__h)
  57.     $(CCAUX) $(O)ansi2knr$(XE) ansi2knr.c
  58.  
  59. echogs$(XE): echogs.c
  60.     $(CCAUX) $(O)echogs$(XE) echogs.c
  61.  
  62. # On the RS/6000 (at least), compiling genarch.c with gcc with -O
  63. # produces a buggy executable.
  64. genarch$(XE): genarch.c
  65.     $(CCAUX) $(O)genarch$(XE) genarch.c
  66.  
  67. genconf$(XE): genconf.c
  68.     $(CCAUX) $(O)genconf$(XE) genconf.c
  69.  
  70. # We need to query the environment to construct gconfig_.h.
  71. INCLUDE=/usr/include
  72. gconfig_.h: $(MAKEFILE) echogs$(XE)
  73.     ./echogs -w gconfig_.h -x 2f2a -s This file was generated automatically. -s -x 2a2f
  74.     if ( test -f $(INCLUDE)/sys/time.h ) then ./echogs -a gconfig_.h -x 23 define SYSTIME_H;\
  75.     fi
  76.     if ( test -f $(INCLUDE)/dirent.h ) then ./echogs -a gconfig_.h -x 23 define DIRENT_H;\
  77.     elif ( test -f $(INCLUDE)/sys/dir.h ) then ./echogs -a gconfig_.h -x 23 define SYSDIR_H;\
  78.     elif ( test -f $(INCLUDE)/sys/ndir.h ) then ./echogs -a gconfig_.h -x 23 define SYSNDIR_H;\
  79.     elif ( test -f $(INCLUDE)/ndir.h ) then ./echogs -a gconfig_.h -x 23 define NDIR_H;\
  80.     fi
  81.  
  82. # ----------------------------- Main program ------------------------------ #
  83.  
  84. BEGINFILES=
  85. CCBEGIN=$(CCC) *.c
  86.  
  87. # Interpreter main program
  88.  
  89. NONDEVS_ALL=gs.$(OBJ) gsmain.$(OBJ) $(INT_ALL) $(LIBGS) gconfig.$(OBJ)
  90.  
  91. $(GS)$(XE): ld.tr echogs $(NONDEVS_ALL) $(DEVS_ALL)
  92.     ./echogs -w ldt.tr -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(GS)$(XE)
  93.     ./echogs -a ldt.tr -n -s gs.$(OBJ) -s
  94.     cat ld.tr >>ldt.tr
  95.     ./echogs -a ldt.tr -s - $(EXTRALIBS) -lm
  96.     $(SH) <ldt.tr
  97.