unixlink.mak 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright (C) 1990, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved.
  2. #
  3. # This software is provided AS-IS with no warranty, either express or
  4. # implied.
  5. #
  6. # This software is distributed under license and may not be copied,
  7. # modified or distributed except as expressly authorized under the terms
  8. # of the license contained in the file LICENSE in this distribution.
  9. #
  10. # For more information about licensing, please refer to
  11. # http://www.ghostscript.com/licensing/. For information on
  12. # commercial licensing, go to http://www.artifex.com/licensing/ or
  13. # contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  14. # San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  15. # $Id: unixlink.mak,v 1.7 2004/11/22 19:36:06 giles Exp $
  16. # Partial makefile common to all Unix configurations.
  17. # This part of the makefile contains the linking steps.
  18. # Define the name of this makefile.
  19. UNIXLINK_MAK=$(GLSRC)unixlink.mak
  20. # The following prevents GNU make from constructing argument lists that
  21. # include all environment variables, which can easily be longer than
  22. # brain-damaged system V allows.
  23. .NOEXPORT:
  24. # ----------------------------- Main program ------------------------------ #
  25. ### Interpreter main program
  26. INT_ARCHIVE_ALL=$(PSOBJ)imainarg.$(OBJ) $(PSOBJ)imain.$(OBJ) \
  27. $(GLOBJ)gconfig.$(OBJ) $(GLOBJ)gscdefs.$(OBJ)
  28. XE_ALL=$(PSOBJ)gs.$(OBJ) $(INT_ARCHIVE_ALL) $(INT_ALL) $(DEVS_ALL)
  29. # Build a library archive for the entire interpreter.
  30. # This is not used in a standard build.
  31. liar_tr=$(GLOBJ)liar.tr
  32. GS_A=$(GS).a
  33. $(GS_A): $(obj_tr) $(ECHOGS_XE) $(INT_ARCHIVE_ALL) $(INT_ALL) $(DEVS_ALL)
  34. rm -f $(GS_A)
  35. $(ECHOGS_XE) -w $(liar_tr) -n - $(AR) $(ARFLAGS) $(GS_A)
  36. $(ECHOGS_XE) -a $(liar_tr) -n -s $(INT_ARCHIVE_ALL) -s
  37. cat $(obj_tr) >>$(liar_tr)
  38. $(ECHOGS_XE) -a $(liar_tr) -s -
  39. $(SH) <$(liar_tr)
  40. $(RANLIB) $(GS_A)
  41. # Here is the final link step. The stuff with LD_RUN_PATH is for SVR4
  42. # systems with dynamic library loading; I believe it's harmless elsewhere.
  43. # The resetting of the environment variables to empty strings is for SCO Unix,
  44. # which has limited environment space.
  45. ldt_tr=$(PSOBJ)ldt.tr
  46. $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL)
  47. $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE)
  48. $(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gs.$(OBJ) -s
  49. cat $(ld_tr) >>$(ldt_tr)
  50. $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)
  51. if [ x$(XLIBDIR) != x ]; then LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; fi; \
  52. XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
  53. FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
  54. DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
  55. DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
  56. DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
  57. DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
  58. DEVICE_DEVS_EXTRA= \
  59. $(SH) <$(ldt_tr)