home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / etherlib / part01 / GNUmake.config next >
Encoding:
Text File  |  1989-10-24  |  1.8 KB  |  128 lines

  1. #
  2. # Build flags which are used by various components
  3. #
  4.  
  5. ifeq ($(SYSTEM),)
  6.  
  7. SYSTEM := $(strip $(shell PATH=$$PATH:.:..:../..:../../.. system ))
  8.  
  9.  
  10. # Compilation parameters
  11. # (don't try to use gcc if the machine isn't supported yet)
  12. # don't use gcc on Sun-4 until we resolve structure pass/return incompatibility
  13.  
  14. ifneq ($(findstring ibmrt,$(SYSTEM)),ibmrt)
  15. ifneq ($(findstring mipsel,$(SYSTEM)),mipsel)
  16. ifneq ($(findstring sun4,$(SYSTEM)),sun4)
  17. CC := gcc
  18. endif
  19. endif
  20. endif
  21.  
  22. #
  23. # Sun-3 floating-point options; replace 68881 with soft or fpa as appropriate
  24. #
  25.  
  26. ifeq ($(findstring sun3,$(SYSTEM)),sun3)
  27.  
  28. FLOAT_OPTION = f68881
  29.  
  30. ifeq ($(findstring os4,$(SYSTEM)),os4)
  31.  
  32. FLIB = /usr/lib/$(FLOAT_OPTION).il
  33.  
  34. else
  35.  
  36. FLIB = /usr/lib/$(FLOAT_OPTION)/libm.il
  37.  
  38. endif
  39.  
  40. endif
  41.  
  42. OPT = -g
  43. OPTG = -g -W
  44.  
  45. ifeq ($(findstring os4,$(SYSTEM)),os4)
  46. ifeq ($(findstring -g,$(OPTG)),-g)
  47. ifeq ($(findstring gcc,$(CC)),gcc)
  48. override LDFLAGS := -g -static
  49. else
  50. override LDFLAGS := -g -Bstatic
  51. endif
  52. endif
  53. endif
  54.  
  55. DEFINES = 
  56.  
  57.  
  58. # Listing variables and flags
  59.  
  60. TROFF = ptroff
  61. VGRIND = vgrind
  62.  
  63. GRIND = $(VGRIND) -d vgrindefs
  64.  
  65.  
  66. # Installation tools
  67.  
  68. INSTALL=install -c
  69.  
  70. ifeq ($(findstring os4,$(SYSTEM)),os4)
  71. RANLIB=ranlib -t
  72. else
  73. RANLIB=ranlib
  74. endif
  75.  
  76.  
  77. # Installation locations
  78.  
  79. MANDIR = /usr/local/man
  80. BINDIR = /usr/local/bin
  81. LIBDIR = /usr/local/lib
  82. INCDIR = /usr/local/include
  83.  
  84. endif
  85.  
  86.  
  87. # Pattern rules
  88.  
  89. %.ps: %.c
  90.     $(VGRIND) -lC -t $< > $@
  91.  
  92. %.ps: %.h
  93.     $(VGRIND) -lC -t $< > $@
  94.  
  95. # Installation pattern rules
  96.  
  97. %/bin: %
  98.     mkdir $@
  99.  
  100. $(BINDIR)/%: %
  101.     $(INSTALL) $< $@
  102.  
  103. %/lib: %
  104.     mkdir $@
  105.  
  106. $(LIBDIR)/%: %
  107.     $(INSTALL) $< $@
  108.     $(RANLIB) $@
  109.     @chmod -x $@
  110.  
  111. %/include: %
  112.     mkdir $@
  113.  
  114. $(INCDIR)/%: %
  115.     $(INSTALL) $< $@
  116.     @chmod -x $@
  117.  
  118. %/man: %
  119.     mkdir $@
  120.  
  121. $(MANDIR)/man1/%: %
  122.     $(INSTALL) $< $@
  123.     @chmod -x $@
  124.  
  125. $(MANDIR)/man3/%: %
  126.     $(INSTALL) $< $@
  127.     @chmod -x $@
  128.