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

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