home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / MAKEF~-!.RS6 < prev    next >
Text File  |  2000-02-11  |  5KB  |  224 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 -DX11
  34. DOBJS = ../drivers/ps.o ../drivers/hpdxy.o ../drivers/tek.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. # The name of the library to install and where to put it.
  136. #
  137. LIB = libvogle.a
  138. DEST = /usr/local/lib
  139.  
  140.  
  141. #
  142. # Any other local libraries that are needed go here
  143. #
  144.  
  145. # SUN
  146. #LLIBS = -lsuntool -lsunwindow -lpixrect
  147. # X11
  148. LLIBS = -lX11
  149. # SGI
  150. #LLIBS = -lgl_s
  151. # NeXT
  152. #LLIBS = -lNeXT_s
  153.  
  154. #
  155. # On the NeXT there is some kind of problem with using -lm when
  156. # linking. Leave LIBM blank in this case.
  157. #
  158.  
  159. LIBM = -lm
  160.  
  161. LIBS = $(LLIBS) $(LIBM)
  162.  
  163. MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
  164. MFFLAGS = $(FFLAGS)
  165.  
  166. all:
  167.     cd src; make -f Makefile \
  168.             CC="$(CC)" \
  169.             DEVICES="$(DEVICES)" \
  170.             FONTLIB="$(FONTLIB)" \
  171.             MCFLAGS="$(MCFLAGS)" \
  172.             DOBJS="$(DOBJS)"\
  173.             RANLIB="$(RANLIB)"
  174.  
  175.     cd hershey/src; make -f Makefile \
  176.             CC="$(CC)" \
  177.             FONTLIB="$(FONTLIB)" \
  178.             MCFLAGS="$(MCFLAGS)" \
  179.             LIBS="$(LIBS)" \
  180.             RANLIB="$(RANLIB)"
  181.  
  182.     cd examples; make -f Makefile \
  183.             CC="$(CC)" \
  184.             MCFLAGS="$(MCFLAGS)" \
  185.             LIBS="$(LIBS)"
  186.  
  187.  
  188.     if test -n "$(F77)" ; \
  189.     then cd examples; make -f Makefile.f77 \
  190.             LIBS="$(LIBS)" \
  191.             MFFLAGS="$(MFFLAGS)" \
  192.             F77="$(F77)" ; \
  193.     fi ; exit 0
  194.  
  195. install:
  196.     cp src/$(LIB) $(DEST)
  197.     chmod 644 $(DEST)/$(LIB)
  198.     $(RANLIB) $(DEST)/$(LIB)
  199.  
  200. clean:
  201.     cd src; make DOBJS="$(DOBJS)" clean
  202.     cd hershey/src; make FONTLIB="$(FONTLIB)" clean
  203.     cd drivers; make clean
  204.     cd examples; make clean
  205.     cd examples; make -f Makefile.f77 clean
  206.     cd examples; make -f Makefile.pas clean
  207.     cd examples/xview; make clean
  208.     cd examples/xt; make clean
  209.     cd examples/sunview; make clean
  210.  
  211. clobber:
  212.     cd src; make DOBJS="$(DOBJS)" clobber
  213.     cd hershey/src; make FONTLIB="$(FONTLIB)" clobber
  214.     cd drivers; make clobber
  215.     cd examples; make clobber
  216.     cd examples; make -f Makefile.f77 clobber
  217.     cd examples; make -f Makefile.pas clobber
  218.     cd examples/xview; make clobber
  219.     cd examples/xt; make clobber
  220.     cd examples/sunview; make clobber
  221.