home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / fermiVogle.tar.Z / fermiVogle.tar / devel / Makefile < prev    next >
Makefile  |  1996-02-07  |  4KB  |  225 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 = $(VOGLE_DIR)/hfonts/
  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 -O2
  96. #CFLAGS = -DSYS5 -g
  97.  
  98. #
  99. # Or on an apollo... (-Wp make it use the 'other cpp')
  100. #CFLAGS = -O -Wp -M3000
  101.  
  102. #
  103. # Or an IBM RS6000
  104. #
  105. #CFLAGS = $(OS) -O -Q
  106.  
  107. #
  108. # NeXTStep....
  109. #
  110. #CFLAGS = -O -ObjC
  111.  
  112. #
  113. # Define F77 if you want the f77 examples.
  114. F77 = f77
  115. #
  116. # You also define your f77 flags here too. These are the ones we used on sun
  117. #
  118. # The usual default...
  119. FFLAGS = -O
  120.  
  121. #
  122. #FFLAGS = -g -w /usr/lib/libm.il
  123. #
  124. # Or on an apollo (We didn't have ftn)
  125. #F77 = 
  126. #FFLAGS = 
  127.  
  128. #
  129. # Or on an IBM RS6000
  130. #
  131. #F77 = xlf
  132. #FFLAGS = -O -qextname
  133.  
  134.  
  135. #
  136. # The name of the library to install and where to put it.
  137. #
  138. LIB = libvogle.a
  139. DEST = $(VOGLE_DIR)/lib
  140.  
  141.  
  142. #
  143. # Any other local libraries that are needed go here
  144. #
  145.  
  146. # SUN
  147. #LLIBS = -lsuntool -lsunwindow -lpixrect
  148. # X11
  149. LLIBS = -lX11_s
  150. # SGI
  151. #LLIBS = -lgl_s
  152. # NeXT
  153. #LLIBS = -lNeXT_s
  154.  
  155. #
  156. # On the NeXT there is some kind of problem with using -lm when
  157. # linking. Leave LIBM blank in this case.
  158. #
  159.  
  160. LIBM = -lm
  161.  
  162. LIBS = $(LLIBS) $(LIBM)
  163.  
  164. MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
  165. MFFLAGS = $(FFLAGS)
  166.  
  167. all:
  168.     cd src; make -f Makefile \
  169.             CC="$(CC)" \
  170.             DEVICES="$(DEVICES)" \
  171.             FONTLIB="$(FONTLIB)" \
  172.             MCFLAGS="$(MCFLAGS)" \
  173.             DOBJS="$(DOBJS)"\
  174.             RANLIB="$(RANLIB)"
  175.  
  176.     cd hershey/src; make -f Makefile \
  177.             CC="$(CC)" \
  178.             FONTLIB="$(FONTLIB)" \
  179.             MCFLAGS="$(MCFLAGS)" \
  180.             LIBS="$(LIBS)" \
  181.             RANLIB="$(RANLIB)"
  182.  
  183.     cd examples; make -f Makefile \
  184.             CC="$(CC)" \
  185.             MCFLAGS="$(MCFLAGS)" \
  186.             LIBS="$(LIBS)"
  187.  
  188.  
  189.     if test -n "$(F77)" ; \
  190.     then cd examples; make -f Makefile.f77 \
  191.             LIBS="$(LIBS)" \
  192.             MFFLAGS="$(MFFLAGS)" \
  193.             F77="$(F77)" ; \
  194.     fi ; exit 0
  195.  
  196. install:
  197.     cp src/$(LIB) $(DEST)
  198.     chmod 644 $(DEST)/$(LIB)
  199.     $(RANLIB) $(DEST)/$(LIB)
  200.  
  201. clean:
  202.     cd src; make DOBJS="$(DOBJS)" clean
  203.     cd hershey/src; make FONTLIB="$(FONTLIB)" clean
  204.     cd drivers; make clean
  205.     cd examples; make clean
  206.     cd examples; make -f Makefile.f77 clean
  207.     cd examples; make -f Makefile.pas clean
  208.     cd examples/xview; make clean
  209.     cd examples/xt; make clean
  210.     cd examples/sunview; make clean
  211.  
  212. clobber:
  213.     cd src; make DOBJS="$(DOBJS)" clobber
  214.     cd hershey/src; make FONTLIB="$(FONTLIB)" clobber
  215.     cd drivers; make clobber
  216.     cd examples; make clobber
  217.     cd examples; make -f Makefile.f77 clobber
  218.     cd examples; make -f Makefile.pas clobber
  219.     cd examples/xview; make clobber
  220.     cd examples/xt; make clobber
  221.     cd examples/sunview; make clobber
  222.