home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / avogl.tar.gz / avogl.tar / vogl / Makefile < prev    next >
Makefile  |  1992-09-24  |  8KB  |  314 lines

  1. #
  2. # Makefile for vogle
  3. #
  4. # Usage: make os
  5. #
  6. # You might have to set:
  7. #
  8. #       DEVICES
  9. #       FONTLIB
  10. #       OS
  11. #       RANLIB
  12. #       CFLAGS
  13. #       FLOATING_POINT
  14. #       F77                     <== If you want the f77 examples
  15. #       FFLAGS                      "   "   "    "   "     "
  16. #
  17. ############################################################
  18. #
  19. # The Devices you want compiled into the library.
  20. # (Note the "make sun" automatically includes -DSUN later on)
  21. #
  22. DEVICES = -DPOSTSCRIPT -DDXY -DHPGL -DTEK
  23. #
  24. # Where the fonts a going to live (For making the Hershey library)
  25. #
  26. #FONTLIB = /usr/local/lib/hershey/
  27. FONTLIB = /tmp/
  28.  
  29. #
  30. # You can set -DBSD or -DSYS5 here
  31. #
  32. #OS = -DBSD
  33.  
  34. RANLIB = ranlib
  35. # If you set -DSYS5 then set RANLIB = "ar ts" or maybe "echo" in later versions
  36. #RANLIB = echo
  37.  
  38. #
  39. # Set your floating point options here...
  40. #
  41. FLOATING_POINT = /usr/lib/libm.il
  42. #
  43. # For most machines...
  44. #FLOATING_POINT =
  45.  
  46. #
  47. # Global CFLAGS can be set here. These are the ones we use on a sun.
  48. # You can add a -f68881 if you are on a sun3 with an MC68881 chip.
  49. #
  50. CFLAGS = $(OS) -O4 -fsingle
  51.  
  52. #
  53. # For SUNOS 3.5 set -DSUN_3_5
  54. #
  55. #CFLAGS = $(OS) -O4 -DSUN_3_5
  56.  
  57. #
  58. # For SGI's
  59. #
  60. #CFLAGS = $(OS) -O -float
  61.  
  62. #
  63. # Or on an apollo... (-Wp make it use the 'other cpp')
  64. #CFLAGS = $(OS) -O -Wp -M3000
  65.  
  66. #
  67. # Or on a Decstation (running Ultrix of course)
  68. #CFLAGS = -O $(OS) -f
  69.  
  70. #
  71. # Or an IBM RS6000
  72. #
  73. #CFLAGS = $(OS) -O -Q
  74.  
  75. #
  76. # Define F77 if you want the f77 examples.
  77. # You also define your f77 flags here too. These are the ones we used on sun
  78. #
  79. F77 = f77
  80. FFLAGS = -g -w
  81. #
  82. # Or on an apollo (We didn't have ftn)
  83. #F77 =
  84. #FFLAGS =
  85.  
  86. #
  87. # Or on an IBM RS6000
  88. #
  89. #F77 = xlf
  90. #FFLAGS = -O -qextname
  91.  
  92. #
  93. # The name of the library to install and where to put it.
  94. #
  95. LIB = libvogle.a
  96. DEST = /usr/local/lib
  97.  
  98. #
  99. # Some dork machines made /bin/csh the default shell and didn't change`
  100. # the man page for make did they now....
  101. #
  102. SHELL = /bin/sh
  103.  
  104. #
  105. # Any other libraries that are needed go here
  106. #
  107.  
  108. SUNLIBS = -lsuntool -lsunwindow -lpixrect
  109. X11LIBS = -lX11
  110. SGILIBS = -lgl_s
  111. UNIXLIBS =
  112. APOLLOLIBS =
  113.  
  114. MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
  115. MFFLAGS = $(FFLAGS) $(FLOATING_POINT)
  116.  
  117. all:
  118.         @echo "Usage: 'make sun' or 'make X11' or 'make sun-X11' or 'make dec-X11' or 'make unix' or 'make apollo' or 'make sgi'"
  119.  
  120. install:
  121.         cp src/$(LIB) $(DEST)
  122.         chmod 644 $(DEST)/$(LIB)
  123.         $(RANLIB) $(DEST)/$(LIB)
  124.  
  125. sun:
  126.         cd src; make -f Makefile \
  127.                         DEVICES="$(DEVICES) -DSUN" \
  128.                         MCFLAGS="$(MCFLAGS)" \
  129.                         DOBJS="../drivers/sun.o"\
  130.                         RANLIB="$(RANLIB)"
  131.  
  132.         cd hershey/src; make -f Makefile \
  133.                         FONTLIB="$(FONTLIB)" \
  134.                         MCFLAGS="$(MCFLAGS)" \
  135.                         LIBS="$(SUNLIBS)" \
  136.                         RANLIB="$(RANLIB)"
  137.  
  138.         cd examples; make -f Makefile \
  139.                         MCFLAGS="$(MCFLAGS)" \
  140.                         LIBS="$(SUNLIBS)"
  141.  
  142.  
  143.         if test -n "$(F77)" ; \
  144.         then cd examples; make -f Makefile.f77 \
  145.                         LIBS="$(SUNLIBS)" \
  146.                         MFFLAGS="$(MFFLAGS)" \
  147.                         F77="$(F77)" ; \
  148.         fi ; exit 0
  149.  
  150. sgi:
  151.         cd hershey/src; make -f Makefile.sgi \
  152.                         FONTLIB="$(FONTLIB)"
  153.  
  154.         cd examples; make -f Makefile.sgi \
  155.                         MCFLAGS="$(MCFLAGS) -DSGI"
  156.  
  157.  
  158. X11:
  159.         cd src; make -f Makefile \
  160.                         DEVICES="$(DEVICES) -DX11" \
  161.                         MCFLAGS="$(MCFLAGS)" \
  162.                         DOBJS="../drivers/X11.o" \
  163.                         RANLIB="$(RANLIB)"
  164.  
  165.         cd hershey/src; make -f Makefile \
  166.                         FONTLIB="$(FONTLIB)" \
  167.                         MCFLAGS="$(MCFLAGS)" \
  168.                         LIBS="$(X11LIBS)" \
  169.                         RANLIB="$(RANLIB)"
  170.  
  171.         cd examples; make -f Makefile \
  172.                         MCFLAGS="$(MCFLAGS)" \
  173.                         LIBS="$(X11LIBS)"
  174.  
  175.         if test -n "$(F77)" ; \
  176.         then cd examples; make -f Makefile.f77 \
  177.                         LIBS="$(X11LIBS)" \
  178.                         MFFLAGS="$(MFFLAGS)" \
  179.                         F77="$(F77)" ; \
  180.         fi ; exit 0
  181.  
  182. sun-X11:
  183.         cd src; make -f Makefile \
  184.                         DEVICES="$(DEVICES) -DX11 -DSUN" \
  185.                         MCFLAGS="$(MCFLAGS)" \
  186.                         DOBJS="../drivers/X11.o ../drivers/sun.o" \
  187.                         RANLIB="$(RANLIB)"
  188.  
  189.         cd hershey/src; make -f Makefile \
  190.                         FONTLIB="$(FONTLIB)" \
  191.                         MCFLAGS="$(MCFLAGS)" \
  192.                         LIBS="$(X11LIBS) $(SUNLIBS)" \
  193.                         RANLIB="$(RANLIB)"
  194.  
  195.         cd examples; make -f Makefile \
  196.                         MCFLAGS="$(MCFLAGS)" \
  197.                         LIBS="$(X11LIBS) $(SUNLIBS)"
  198.  
  199.         if test -n "$(F77)" ; \
  200.         then cd examples; make -f Makefile.f77 \
  201.                         LIBS="$(X11LIBS) $(SUNLIBS)" \
  202.                         MFFLAGS="$(MFFLAGS)" \
  203.                         F77="$(F77)" ; \
  204.         fi ; exit 0
  205.  
  206. dec-X11:
  207.         cd src; make -f Makefile \
  208.                         DEVICES="$(DEVICES) -DX11 -DDECX11" \
  209.                         MCFLAGS="$(MCFLAGS)" \
  210.                         DOBJS="../drivers/X11.o ../drivers/decX11.o"
  211.                         RANLIB="$(RANLIB)"
  212.  
  213.         cd hershey/src; make -f Makefile \
  214.                         FONTLIB="$(FONTLIB)" \
  215.                         MCFLAGS="$(MCFLAGS)" \
  216.                         LIBS="$(X11LIBS)" \
  217.                         RANLIB="$(RANLIB)"
  218.  
  219.         cd examples; make -f Makefile \
  220.                         MCFLAGS="$(MCFLAGS)" \
  221.                         LIBS="$(X11LIBS)"
  222.  
  223.         if test -n "$(F77)" ; \
  224.         then cd examples; make -f Makefile.f77 \
  225.                         LIBS="$(X11LIBS)" \
  226.                         MFFLAGS="$(MFFLAGS)" \
  227.                         F77="$(F77)" ; \
  228.         fi ; exit 0
  229.  
  230. apollo:
  231.         cd src; make -f Makefile \
  232.                         DEVICES="$(DEVICES) -DAPOLLO" \
  233.                         MCFLAGS="$(MCFLAGS)" \
  234.                         DOBJS="../drivers/apollo.o"
  235.                         RANLIB="$(RANLIB)"
  236.  
  237.  
  238.         cd hershey/src; make -f Makefile \
  239.                         FONTLIB="$(FONTLIB)" \
  240.                         LIBS="$(APOLLOLIBS)" \
  241.                         MCFLAGS="$(MCFLAGS)" \
  242.                         RANLIB="$(RANLIB)"
  243.  
  244.         cd examples; make -f Makefile \
  245.                         LIBS="$(APOLLOLIBS)" \
  246.                         MCFLAGS="$(MCFLAGS)"
  247.  
  248.  
  249.         if test -n "$(F77)" ; \
  250.         then cd examples; make -f Makefile.f77 \
  251.                         MFFLAGS="$(MFFLAGS)" \
  252.                         LIBS="$(APOLLOLIBS)" \
  253.                         F77="$(F77)" ; \
  254.         fi ; exit 0
  255.  
  256. unix:
  257.         cd src; make -f Makefile \
  258.                         DEVICES="$(DEVICES)" \
  259.                         MCFLAGS="$(MCFLAGS)" \
  260.                         DOBJS=""\
  261.                         RANLIB="$(RANLIB)"
  262.  
  263.         cd hershey/src; make -f Makefile \
  264.                         FONTLIB="$(FONTLIB)" \
  265.                         MCFLAGS="$(MCFLAGS)" \
  266.                         LIBS="$(UNIXLIBS)" \
  267.                         RANLIB="$(RANLIB)"
  268.  
  269.         cd examples; make -f Makefile \
  270.                         MCFLAGS="$(MCFLAGS)" \
  271.                         LIBS="$(UNIXLIBS)"
  272.  
  273.  
  274.         if test -n "$(F77)" ; \
  275.         then cd examples; make -f Makefile.f77 \
  276.                         LIBS="$(UNIXLIBS)" \
  277.                         MFFLAGS="$(MFFLAGS)" \
  278.                         F77="$(F77)" ; \
  279.         fi ; exit 0
  280.  
  281. gcc:
  282.         cd src
  283.         make -f Makefile.gcc
  284.         cd /hershey/src
  285.         make -f Makefile.gcc
  286.         cd //examples
  287.         make -f Makefile.gcc
  288.         cd /
  289.  
  290.  
  291. dcc:
  292.         cd src
  293.         make -f Makefile.dcc
  294.         cd /hershey/src
  295.         make -f Makefile.dcc
  296.         cd //examples
  297.         make -f Makefile.dcc
  298.         cd /
  299.  
  300.  
  301. clean:
  302.         cd src; make clean
  303.         cd hershey/src; make clean
  304.         cd drivers; make clean
  305.         cd examples; make clean
  306.         cd examples; make -f Makefile.f77 clean
  307.  
  308. clobber:
  309.         cd src; make clobber
  310.         cd hershey/src; make clobber
  311.         cd drivers; make clobber
  312.         cd examples; make clobber
  313.         cd examples; make -f Makefile.f77 clobber
  314.