home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / MAKEFILE.SUN < prev    next >
Text File  |  2000-02-11  |  5KB  |  244 lines

  1. #
  2. # Makefile for VOGLE 
  3. #
  4. # Usage: make
  5. #
  6. # As well as selecting the devices, you may have to change LLIBS and MLIBS 
  7. # as well (see below).
  8. #
  9. # Some machines use /bin/csh in Make (or use the envionment variable
  10. # SHELL. We want to use /bin/sh.
  11. #
  12. SHELL = /bin/sh
  13. #
  14. #  Which cc to use
  15. #
  16. #CC = gcc
  17. CC = cc
  18.  
  19. #  The devices you wish to have compiled into the library and the
  20. #  location of the object files for each device relative to the 
  21. #  src directory. For each device defined there should be a 
  22. #  corresponding ../drivers/file.o in the DOBJS line.
  23. #
  24. #  Possible DEVICES and their object files are:
  25. #        -DPOSTSCRIPT    ../drivers/ps.o
  26. #        -DHPGL        ../drivers/hpdxy.o
  27. #        -DDXY        ../drivers/hpdxy.o
  28. #        -DTEK        ../drivers/tek.o
  29. #        -DSUN        ../drivers/sun.o    (Sunview that is)
  30. #        -DX11        ../drivers/X11.o
  31. #        -DNeXT        ../drivers/NeXT.o    (NeXTStep)
  32. #
  33. DEVICES = -DPOSTSCRIPT -DHPGL -DDXY -DTEK -DSUN -DX11
  34. DOBJS = ../drivers/ps.o ../drivers/hpdxy.o ../drivers/tek.o ../drivers/sun.o ../drivers/X11.o
  35.  
  36. # (Note:- it is possible to have both -DX11 -DSUN, but then you have to
  37. # link with both the X11 libraries and the sun libraries)
  38. #
  39.  
  40. #
  41. # Where the fonts a going to live (For making the Hershey library)
  42. # (Remember /tmp usually gets cleared from time to time)
  43. #
  44. FONTLIB = /usr/local/lib/hershey/
  45. #FONTLIB = /tmp/hfonts
  46.  
  47. #
  48. #  For BSD type machines we need to use ranlib
  49. #
  50. RANLIB = ranlib
  51. # If you have SYS5 then set RANLIB = "ar ts" or maybe "echo" in later versions
  52. #RANLIB = echo
  53.  
  54. #
  55. # Set any Special floating point options here...
  56. #
  57. # The default 
  58. #FLOATING_POINT =
  59.  
  60. # On a SUN (use inline math functions, don't promote to double in expressions)
  61. #FLOATING_POINT = /usr/lib/libm.il -fsingle 
  62.  
  63. # On a SUN3 with an mc68881 floating point chip
  64. #FLOATING_POINT = /usr/lib/libm.il -fsingle -f68881
  65.  
  66. #
  67. # On a NeXT     (for inline expansion of math primitives)
  68. #FLOATING_POINT = -DINLINE_MATH
  69.  
  70. # On an SGI
  71. #FLOATING_POINT = -float
  72.  
  73. # Or on a Decstation (running Ultrix of course)
  74. #FLOATING_POINT = -f
  75.  
  76.  
  77. #
  78. # Global CFLAGS can be set here.
  79. #
  80. # The default
  81. #
  82. #CFLAGS = -O
  83.  
  84. #
  85. #  SUN4/SUN3
  86. CFLAGS = -O4
  87.  
  88. # For SUNOS 3.5 set -DSUN_3_5
  89. #
  90. #CFLAGS = -O4 -DSUN_3_5
  91.  
  92. #
  93. # For SGI's
  94. #
  95. #CFLAGS = -DSYS5 -O
  96.  
  97. #
  98. # Or on an apollo... (-Wp make it use the 'other cpp')
  99. #CFLAGS = -O -Wp -M3000
  100.  
  101. #
  102. # Or an IBM RS6000
  103. #
  104. #CFLAGS = $(OS) -O -Q
  105.  
  106. #
  107. # NeXTStep....
  108. #
  109. #CFLAGS = -O -ObjC
  110.  
  111. #
  112. # Define F77 if you want the f77 examples.
  113. F77 = f77
  114. #
  115. # You also define your f77 flags here too. These are the ones we used on sun
  116. #
  117. # The usual default...
  118. FFLAGS = -O
  119.  
  120. #
  121. FFLAGS = -g -w /usr/lib/libm.il
  122. #
  123. # Or on an apollo (We didn't have ftn)
  124. #F77 = 
  125. #FFLAGS = 
  126.  
  127. #
  128. # Or on an IBM RS6000
  129. #
  130. #F77 = xlf
  131. #FFLAGS = -O -qextname
  132.  
  133.  
  134. #
  135. # Define PAS if you want the sun pascal examples.
  136. PAS = pc
  137. #
  138. # You also define your pc flags here too. These are the ones we used on sun
  139. #
  140. # The usual default...
  141.  
  142. #
  143. PFLAGS = -g -w /usr/lib/libm.il
  144.  
  145. #
  146. # The name of the library to install and where to put it.
  147. #
  148. LIB = libvogle.a
  149. DEST = /usr/local/lib
  150.  
  151.  
  152. #
  153. # Any other local libraries that are needed go here
  154. #
  155.  
  156. # SUN
  157. LLIBS = -lsuntool -lsunwindow -lpixrect -lX11
  158. # X11
  159. #LLIBS = -lX11
  160. # SGI
  161. #LLIBS = -lgl_s
  162. # NeXT
  163. #LLIBS = -lNeXT_s
  164.  
  165. #
  166. # On the NeXT there is some kind of problem with using -lm when
  167. # linking. Leave LIBM blank in this case.
  168. #
  169.  
  170. LIBM = -lm
  171.  
  172. LIBS = $(LLIBS) $(LIBM)
  173.  
  174. MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
  175. MFFLAGS = $(FFLAGS)
  176.  
  177. all:
  178.     cd src; make -f Makefile \
  179.             CC="$(CC)" \
  180.             DEVICES="$(DEVICES)" \
  181.             FONTLIB="$(FONTLIB)" \
  182.             MCFLAGS="$(MCFLAGS)" \
  183.             DOBJS="$(DOBJS)"\
  184.             RANLIB="$(RANLIB)"
  185.  
  186.     cd hershey/src; make -f Makefile \
  187.             CC="$(CC)" \
  188.             FONTLIB="$(FONTLIB)" \
  189.             MCFLAGS="$(MCFLAGS)" \
  190.             LIBS="$(LIBS)" \
  191.             RANLIB="$(RANLIB)"
  192.  
  193.     cd examples; make -f Makefile \
  194.             CC="$(CC)" \
  195.             MCFLAGS="$(MCFLAGS)" \
  196.             LIBS="$(LIBS)"
  197.  
  198.  
  199.     if test -n "$(F77)" ; \
  200.     then cd examples; make -f Makefile.f77 \
  201.             LIBS="$(LIBS)" \
  202.             MFFLAGS="$(MFFLAGS)" \
  203.             F77="$(F77)" ; \
  204.     fi ; exit 0
  205.  
  206.     if test -n "$(PAS)" ; \
  207.     then cd examples; make -f Makefile.pas \
  208.             LIBS="$(LIBS)" \
  209.             MPFLAGS="$(MPFLAGS)" \
  210.             PAS="$(PAS)" ; \
  211.     fi ; exit 0
  212.  
  213. install:
  214.     cp src/$(LIB) $(DEST)
  215.     chmod 644 $(DEST)/$(LIB)
  216.     $(RANLIB) $(DEST)/$(LIB)
  217.     cp src/vogle.h /usr/include/vogle.h
  218.     chmod 644 /usr/include/vogle.h
  219.  
  220. clean:
  221.     cd src; make DOBJS="$(DOBJS)" clean
  222.     cd hershey/src; make FONTLIB="$(FONTLIB)" clean
  223.     cd drivers; make clean
  224.     cd examples; make clean
  225.     cd examples; make -f Makefile.f77 clean
  226.     cd examples; make -f Makefile.pas clean
  227.     cd examples/xview; make clean
  228.     cd examples/xt; make clean
  229.     cd examples/sunview; make clean
  230.  
  231. clobber:
  232.     cd src; make DOBJS="$(DOBJS)" clobber
  233.     cd hershey/src; make FONTLIB="$(FONTLIB)" clobber
  234.     cd drivers; make clobber
  235.     cd examples; make clobber
  236.     cd examples; make -f Makefile.f77 clobber
  237.     cd examples; make -f Makefile.pas clobber
  238.     cd examples/xview; make clobber
  239.     cd examples/xt; make clobber
  240.     cd examples/sunview; make clobber
  241.