unixlink.mak 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright (C) 1990, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved.
  2. #
  3. # This file is part of AFPL Ghostscript.
  4. #
  5. # AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
  6. # distributor accepts any responsibility for the consequences of using it, or
  7. # for whether it serves any particular purpose or works at all, unless he or
  8. # she says so in writing. Refer to the Aladdin Free Public License (the
  9. # "License") for full details.
  10. #
  11. # Every copy of AFPL Ghostscript must include a copy of the License, normally
  12. # in a plain ASCII text file named PUBLIC. The License grants you the right
  13. # to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14. # conditions described in the License. Among other things, the License
  15. # requires that the copyright notice and this notice be preserved on all
  16. # copies.
  17. # $Id: unixlink.mak,v 1.3 2000/11/28 00:14:48 raph Exp $
  18. # Partial makefile common to all Unix configurations.
  19. # This part of the makefile contains the linking steps.
  20. # Define the name of this makefile.
  21. UNIXLINK_MAK=$(GLSRC)unixlink.mak
  22. # The following prevents GNU make from constructing argument lists that
  23. # include all environment variables, which can easily be longer than
  24. # brain-damaged system V allows.
  25. .NOEXPORT:
  26. # ----------------------------- Main program ------------------------------ #
  27. ### Library files and archive
  28. LIB_ARCHIVE_ALL=$(LIB_ALL) $(DEVS_ALL)\
  29. $(GLOBJ)gsnogc.$(OBJ) $(GLOBJ)gconfig.$(OBJ) $(GLOBJ)gscdefs.$(OBJ)
  30. # Build an archive for the library only.
  31. # This is not used in a standard build.
  32. GSLIB_A=$(GS)lib.a
  33. $(GSLIB_A): $(LIB_ARCHIVE_ALL)
  34. rm -f $(GSLIB_A)
  35. $(AR) $(ARFLAGS) $(GSLIB_A) $(LIB_ARCHIVE_ALL)
  36. $(RANLIB) $(GSLIB_A)
  37. ### Interpreter main program
  38. INT_ARCHIVE_ALL=$(PSOBJ)imainarg.$(OBJ) $(PSOBJ)imain.$(OBJ) $(INT_ALL) $(DEVS_ALL)\
  39. $(GLOBJ)gconfig.$(OBJ) $(GLOBJ)gscdefs.$(OBJ)
  40. XE_ALL=$(PSOBJ)gs.$(OBJ) $(INT_ARCHIVE_ALL)
  41. # Build a library archive for the entire interpreter.
  42. # This is not used in a standard build.
  43. GS_A=$(GS).a
  44. $(GS_A): $(INT_ARCHIVE_ALL)
  45. rm -f $(GS_A)
  46. $(AR) $(ARFLAGS) $(GS_A) $(INT_ARCHIVE_ALL)
  47. $(RANLIB) $(GS_A)
  48. # Here is the final link step. The stuff with LD_RUN_PATH is for SVR4
  49. # systems with dynamic library loading; I believe it's harmless elsewhere.
  50. # The resetting of the environment variables to empty strings is for SCO Unix,
  51. # which has limited environment space.
  52. ldt_tr=$(PSOBJ)ldt.tr
  53. $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL)
  54. $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE)
  55. $(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gs.$(OBJ) -s
  56. cat $(ld_tr) >>$(ldt_tr)
  57. $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)
  58. if [ x$(XLIBDIR) != x ]; then LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; fi; \
  59. XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
  60. FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
  61. DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
  62. DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
  63. DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
  64. DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
  65. $(SH) <$(ldt_tr)