home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / MAKEFILE.HP < prev    next >
Text File  |  2000-02-11  |  3KB  |  132 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. #        -DHPGT        ../drivers/hpgt.o    (NeXTStep)
  33. #
  34. DEVICES = -DPOSTSCRIPT -DHPGL -DDXY -DTEK -DX11 -DHPGT
  35. DOBJS = ../drivers/ps.o ../drivers/hpdxy.o ../drivers/tek.o ../drivers/X11.o ../drivers/hpgt.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 = echo
  48.  
  49. #
  50. # Set any Special floating point options here...
  51. #
  52. # The default 
  53. FLOATING_POINT =
  54. CFLAGS = -O    -I/usr/include/X11R4
  55. F77 = fort77
  56. FFLAGS = -O +ppu +E3
  57. #
  58. # You should set the environment variable FCOPTS in general so
  59. # that don't need +float
  60. #
  61. LIB = libvogle.a
  62. DEST = /usr/lib
  63. LLIBS = -L/usr/lib/X11R4 -lX11
  64. LIBM = -lm
  65.  
  66. LIBS = $(LLIBS) $(LIBM)
  67.  
  68. MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
  69. MFFLAGS = $(FFLAGS)
  70.  
  71. all:
  72.     cd src; make -f Makefile \
  73.             CC="$(CC)" \
  74.             DEVICES="$(DEVICES)" \
  75.             FONTLIB="$(FONTLIB)" \
  76.             MCFLAGS="$(MCFLAGS)" \
  77.             DOBJS="$(DOBJS)"\
  78.             RANLIB="$(RANLIB)"
  79.  
  80.     cd hershey/src; make -f Makefile \
  81.             CC="$(CC)" \
  82.             FONTLIB="$(FONTLIB)" \
  83.             MCFLAGS="$(MCFLAGS)" \
  84.             LIBS="$(LIBS)" \
  85.             RANLIB="$(RANLIB)"
  86.  
  87.     cd examples; make -f Makefile \
  88.             CC="$(CC)" \
  89.             MCFLAGS="$(MCFLAGS)" \
  90.             LIBS="$(LIBS)"
  91.  
  92.  
  93.     if test -n "$(F77)" ; \
  94.     then cd examples; make -f Makefile.f77 \
  95.             LIBS="$(LIBS)" \
  96.             MFFLAGS="$(MFFLAGS)" \
  97.             F77="$(F77)" ; \
  98.     fi ; exit 0
  99.  
  100. install:
  101.     cp src/$(LIB) $(DEST)
  102.     chmod 644 $(DEST)/$(LIB)
  103.     $(RANLIB) $(DEST)/$(LIB)
  104.     cp src/vogle.h /usr/include/vogle.h
  105.     chmod 644 /usr/include/vogle.h
  106.     cp docs/vogle.3 /usr/man/manl/vogle.l
  107.     chmod 644 /usr/man/manl/vogle.l
  108.  
  109. clean:
  110.     cd src; make DOBJS="$(DOBJS)" clean
  111.     cd hershey/src; make FONTLIB="$(FONTLIB)" clean
  112.     cd drivers; make clean
  113.     cd examples; make clean
  114.     cd examples; make -f Makefile.f77 clean
  115.     cd examples; make -f Makefile.pas clean
  116.     cd examples/xview; make clean
  117.     cd examples/xt; make clean
  118.     cd examples/sunview; make clean
  119.  
  120. clobber:
  121.     cd src; make DOBJS="$(DOBJS)" clobber
  122.     cd hershey/src; make FONTLIB="$(FONTLIB)" clobber
  123.     cd drivers; make clobber
  124.     cd examples; make clobber
  125.     cd examples; make -f Makefile.f77 clobber
  126.     cd examples; make -f Makefile.pas clobber
  127.     cd examples/xview; make clobber
  128.     cd examples/xt; make clobber
  129.     cd examples/sunview; make clobber
  130.