home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / MAKEFILE.SV < prev    next >
Text File  |  2000-02-11  |  5KB  |  223 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. #        -DEPSON8    ../drivers/epson8.o
  33. #
  34. DEVICES = -DPOSTSCRIPT -DHPGL -DDXY -DTEK -DSUN
  35. DOBJS = ../drivers/ps.o ../drivers/hpdxy.o ../drivers/tek.o ../drivers/sun.o
  36.  
  37. # (Note:- it is possible to have both -DX11 -DSUN, but then you have to
  38. # link with both the X11 libraries and the sun libraries)
  39. #
  40.  
  41. #
  42. # Where the fonts a going to live (For making the Hershey library)
  43. # (Remember /tmp usually gets cleared from time to time)
  44. #
  45. FONTLIB = /usr/local/lib/hershey/
  46. #FONTLIB = /tmp/hfonts
  47.  
  48. #
  49. #  For BSD type machines we need to use ranlib
  50. #
  51. RANLIB = ranlib
  52. # If you have SYS5 then set RANLIB = "ar ts" or maybe "echo" in later versions
  53. #RANLIB = echo
  54.  
  55. #
  56. # Set any Special floating point options here...
  57. #
  58. # The default 
  59. #FLOATING_POINT =
  60.  
  61. # On a SUN (use inline math functions, don't promote to double in expressions)
  62. FLOATING_POINT = /usr/lib/libm.il -fsingle
  63.  
  64. # On a SUN3 with an mc68881 floating point chip
  65. #FLOATING_POINT = /usr/lib/libm.il -fsingle -f68881
  66.  
  67. #
  68. # On a NeXT     (for inline expansion of math primitives)
  69. #FLOATING_POINT = -DINLINE_MATH
  70.  
  71. # On an SGI
  72. #FLOATING_POINT = -float
  73.  
  74. # Or on a Decstation (running Ultrix of course)
  75. #FLOATING_POINT = -f
  76.  
  77.  
  78. #
  79. # Global CFLAGS can be set here.
  80. #
  81. # The default
  82. #
  83. #CFLAGS = -O
  84.  
  85. #
  86. #  SUN4/SUN3
  87. CFLAGS = -O4
  88.  
  89. # For SUNOS 3.5 set -DSUN_3_5
  90. #
  91. #CFLAGS = -O4 -DSUN_3_5
  92.  
  93. #
  94. # For SGI's
  95. #
  96. #CFLAGS = -DSYS5 -O
  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 = /usr/local/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
  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.     cd examples/sunview; make -f Makefile \
  190.             LIBS="$(LIBS)" \
  191.             MCFLAGS="$(MCFLAGS)" \
  192.             CC="$(CC)"
  193.  
  194. install:
  195.     cp src/$(LIB) $(DEST)
  196.     chmod 644 $(DEST)/$(LIB)
  197.     $(RANLIB) $(DEST)/$(LIB)
  198.  
  199. clean:
  200.     cd src; make DOBJS="$(DOBJS)" clean
  201.     cd hershey/src; make FONTLIB="$(FONTLIB)" clean
  202.     cd drivers; make clean
  203.     cd examples; make clean
  204.     cd examples; make -f Makefile.f77 clean
  205.     cd examples; make -f Makefile.pas clean
  206.     cd examples/xview; make clean
  207.     cd examples/xt; make clean
  208.     cd examples/sunview; make clean
  209.  
  210. clobber:
  211.     cd src; make DOBJS="$(DOBJS)" clobber
  212.     cd hershey/src; make FONTLIB="$(FONTLIB)" clobber
  213.     cd drivers; make clobber
  214.     cd examples; make clobber
  215.     cd examples; make -f Makefile.f77 clobber
  216.     cd examples; make -f Makefile.pas clobber
  217.     cd examples/xview; make clobber
  218.     cd examples/xt; make clobber
  219.     cd examples/sunview; make clobber
  220.