home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / MAKEFILE < prev    next >
Text File  |  2000-02-11  |  5KB  |  226 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. #        -DTG        Tk/Tcl Graphics widget
  33. #                (object is in tclvogle library)
  34. #
  35. DEVICES = -DPOSTSCRIPT -DHPGL -DDXY -DTEK -DX11
  36. DOBJS = ../drivers/ps.o ../drivers/hpdxy.o ../drivers/tek.o ../drivers/X11.o
  37.  
  38. # (Note:- it is possible to have both -DX11 -DSUN, but then you have to
  39. # link with both the X11 libraries and the sun libraries)
  40. #
  41.  
  42. #
  43. # Where the fonts a going to live (For making the Hershey library)
  44. # (Remember /tmp usually gets cleared from time to time)
  45. #
  46. FONTLIB = /usr/local/lib/hershey/
  47. #FONTLIB = /tmp/hfonts
  48.  
  49. #
  50. #  For BSD type machines we need to use ranlib
  51. #
  52. RANLIB = ranlib
  53. # If you have SYS5 then set RANLIB = "ar ts" or maybe "echo" in later versions
  54. #RANLIB = echo
  55.  
  56. #
  57. # Set any Special floating point options here...
  58. #
  59. # The default 
  60. FLOATING_POINT =
  61.  
  62. # On a SUN (use inline math functions, don't promote to double in expressions)
  63. #FLOATING_POINT = /usr/lib/libm.il -fsingle
  64.  
  65. # On a SUN3 with an mc68881 floating point chip
  66. #FLOATING_POINT = /usr/lib/libm.il -fsingle -f68881
  67.  
  68. #
  69. # On a NeXT     (for inline expansion of math primitives)
  70. #FLOATING_POINT = -DINLINE_MATH
  71.  
  72. # On an SGI
  73. #FLOATING_POINT = -float
  74.  
  75. # Or on a Decstation (running Ultrix of course)
  76. #FLOATING_POINT = -f
  77.  
  78.  
  79. #
  80. # Global CFLAGS can be set here.
  81. #
  82. # The default
  83. #
  84. CFLAGS = -O
  85.  
  86. #
  87. #  SUN4/SUN3
  88. #CFLAGS = -O4
  89.  
  90. # For SUNOS 3.5 set -DSUN_3_5
  91. #
  92. #CFLAGS = -O4 -DSUN_3_5
  93.  
  94. #
  95. # For SGI's
  96. #
  97. #CFLAGS = -DSYS5 -O
  98.  
  99. #
  100. # Or on an apollo... (-Wp make it use the 'other cpp')
  101. #CFLAGS = -O -Wp -M3000
  102.  
  103. #
  104. # Or an IBM RS6000
  105. #
  106. #CFLAGS = $(OS) -O -Q
  107.  
  108. #
  109. # NeXTStep....
  110. #
  111. #CFLAGS = -O -ObjC
  112.  
  113. #
  114. # Define F77 if you want the f77 examples.
  115. F77 = f77
  116. #
  117. # You also define your f77 flags here too. These are the ones we used on sun
  118. #
  119. # The usual default...
  120. FFLAGS = -O
  121.  
  122. #
  123. #FFLAGS = -g -w /usr/lib/libm.il
  124. #
  125. # Or on an apollo (We didn't have ftn)
  126. #F77 = 
  127. #FFLAGS = 
  128.  
  129. #
  130. # Or on an IBM RS6000
  131. #
  132. #F77 = xlf
  133. #FFLAGS = -O -qextname
  134.  
  135.  
  136. #
  137. # The name of the library to install and where to put it.
  138. #
  139. LIB = libvogle.a
  140. DEST = /usr/local/lib
  141.  
  142.  
  143. #
  144. # Any other local libraries that are needed go here
  145. #
  146.  
  147. # SUN
  148. #LLIBS = -lsuntool -lsunwindow -lpixrect
  149. # X11
  150. LLIBS = -L/usr/X11/lib -lX11
  151. # SGI
  152. #LLIBS = -lgl_s
  153. # NeXT
  154. #LLIBS = -lNeXT_s
  155.  
  156. #
  157. # On the NeXT there is some kind of problem with using -lm when
  158. # linking. Leave LIBM blank in this case.
  159. #
  160.  
  161. LIBM = -lm
  162.  
  163. LIBS = $(LLIBS) $(LIBM)
  164.  
  165. MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
  166. MFFLAGS = $(FFLAGS)
  167.  
  168. all:
  169.     cd src; make -f Makefile \
  170.             CC="$(CC)" \
  171.             DEVICES="$(DEVICES)" \
  172.             FONTLIB="$(FONTLIB)" \
  173.             MCFLAGS="$(MCFLAGS)" \
  174.             DOBJS="$(DOBJS)"\
  175.             RANLIB="$(RANLIB)"
  176.  
  177.     cd hershey/src; make -f Makefile \
  178.             CC="$(CC)" \
  179.             FONTLIB="$(FONTLIB)" \
  180.             MCFLAGS="$(MCFLAGS)" \
  181.             LIBS="$(LIBS)" \
  182.             RANLIB="$(RANLIB)"
  183.  
  184.     cd examples; make -f Makefile \
  185.             CC="$(CC)" \
  186.             MCFLAGS="$(MCFLAGS)" \
  187.             LIBS="$(LIBS)"
  188.  
  189.  
  190.     if test -n "$(F77)" ; \
  191.     then cd examples; make -f Makefile.f77 \
  192.             LIBS="$(LIBS)" \
  193.             MFFLAGS="$(MFFLAGS)" \
  194.             F77="$(F77)" ; \
  195.     fi ; exit 0
  196.  
  197. install:
  198.     cp src/$(LIB) $(DEST)
  199.     chmod 644 $(DEST)/$(LIB)
  200.     $(RANLIB) $(DEST)/$(LIB)
  201.  
  202. clean:
  203.     cd src; make DOBJS="$(DOBJS)" clean
  204.     cd hershey/src; make FONTLIB="$(FONTLIB)" clean
  205.     cd drivers; make clean
  206.     cd examples; make clean
  207.     cd examples; make -f Makefile.f77 clean
  208.     cd examples; make -f Makefile.pas clean
  209.     cd examples/xview; make clean
  210.     cd examples/xt; make clean
  211.     cd examples/sunview; make clean
  212.  
  213. clobber:
  214.     cd src; make DOBJS="$(DOBJS)" clobber
  215.     cd hershey/src; make FONTLIB="$(FONTLIB)" clobber
  216.     cd drivers; make clobber
  217.     cd examples; make clobber
  218.     cd examples; make -f Makefile.f77 clobber
  219.     cd examples; make -f Makefile.pas clobber
  220.     cd examples/xview; make clobber
  221.     cd examples/xt; make clobber
  222.     cd examples/sunview; make clobber
  223.