home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 334_02 / makefile.unx < prev    next >
Makefile  |  1991-02-05  |  6KB  |  199 lines

  1. #
  2. # GNUPLOT Makefile
  3. #
  4.  
  5. # directory where to install executables on 'make install'
  6. DEST=/usr/local/bin
  7. # directory for installing man page on 'make man_install'
  8. MANDEST=/usr/man/manl
  9. # where to install help file gnuplot.gih
  10. #HELPDEST=/usr/local/lib/gnuplot.gih
  11. HELPDEST=docs/gnuplot.gih
  12. # Where to send email about bugs and comments (locally)
  13. EMAIL=\"pixar\!bug-gnuplot@sun.com\"
  14.  
  15. # -DVFORK if you have vfork()
  16. # -DBCOPY if your memcpy() is called bcopy() (a Berkeleyism, right?)
  17. # -DBZERO if you need to use bzero() (another BSD feature) instead of memset() 
  18. # -DNOCOPY if you don't have a memcpy() by any name
  19. # -DGAMMA=gamma if you've got gamma(3)
  20. # -DNOCWDRC to inhibit check of ".gnuplot" in current directory
  21. #    (for security reasons)
  22. # -DGETCWD if your unix uses getcwd() instead of getcd()
  23. #    this is needed by HP-UX and Cray Unicos systems.
  24. # -Dunix is required to explicitly define "unix" for SCO 
  25. # -fswitch if you are compiling on a Sun3 (or even -f68881)
  26. #    (but -fswitch is buggy on some systems, so watch out)
  27. # -O if you trust your compiler's optimizer
  28. CFLAGS = -DVFORK -DBCOPY -DBZERO -DGAMMA=gamma #-gx #-O
  29.  
  30. # -lplot if you have -DUNIXPLOT
  31. # -lsuntool -lsunwindow -lpixrect  if you have -DSUN
  32. # -lgl_s if IRIS4D
  33. # -lccgi if -DCGI
  34. LIBS = -lm -lplot
  35.  
  36. # -D<terminal> in TERMFLAGS iff you wish to support <terminal>
  37. # see other terminal defines in term.h
  38. # -DCGI        SCO CGI
  39. # -DFIG         Fig graphics language (requires object.h from TransFig)
  40. # -DIRIS4D      IRIS4D series computer
  41. # -DSUN         Sun Microsystems Workstation
  42. # -DUNIXPLOT    unixplot
  43.  
  44. TERMFLAGS =  -Iterm -DUNIXPLOT
  45.  
  46. OBJS = bitmap.o command.o eval.o graphics.o help.o internal.o misc.o parse.o\
  47.     plot.o scanner.o setshow.o standard.o term.o util.o 
  48.  
  49. DIRS = term demo bugtest docs docs/latextut translate
  50. CSOURCE1 = command.c setshow.c 
  51. CSOURCE2 = help.c graphics.c internal.c 
  52. CSOURCE3 = misc.c eval.c parse.c plot.c scanner.c standard.c 
  53. CSOURCE4 = bitmap.c term.c util.c version.c
  54. CSOURCE5 = term/aed.trm term/cgi.trm term/dxy.trm term/eepic.trm \
  55.     term/epson.trm term/fig.trm term/hp26.trm term/hp2648.trm \
  56.     term/hpgl.trm term/hpljii.trm 
  57. CSOURCE6 = term/imPcodes.h term/imagen.trm term/object.h \
  58.     term/iris4d.trm term/kyo.trm term/latex.trm term/pc.trm 
  59. CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
  60.     term/t410x.trm term/tek.trm term/unixpc.trm term/unixplot.trm \
  61.     term/v384.trm term/x11.trm gnuplot_x11.c
  62. # not C code, but still needed
  63. ETC = Copyright README README.gnutex makefile.unx makefile.vms  \
  64.     README.x11 makefile.x11 \
  65.     makefile.3b1 plot.h help.h setshow.h bitmap.h term.h lasergnu \
  66.      demo/1.dat demo/2.dat demo/3.dat demo/controls.demo \
  67.     demo/simple.demo demo/polar.demo demo/electron.demo \
  68.     demo/param.demo demo/using.demo demo/using.dat \
  69.     bugtest/README bugtest/printf.c bugtest/scanf.c \
  70.     bugtest/mscbug.c term/README \
  71.     linkopt.vms buildvms.com
  72. # PC-specific files
  73. PC = corgraph.asm corplot.c header.mac hrcgraph.asm lineproc.mac \
  74.     linkopt.msc linkopt.tc makefile.msc makefile.tc pcgraph.asm 
  75. # Documentation and help files
  76. DOCS1 = docs/Makefile docs/README docs/checkdoc.c docs/doc2gih.c \
  77.     docs/doc2hlp.c docs/doc2hlp.com docs/doc2ms.c docs/doc2tex.c \
  78.     docs/gnuplot.1 docs/lasergnu.1 \
  79.     docs/titlepage.ms docs/titlepage.tex
  80. DOCS2 = docs/gnuplot.doc
  81. DOCS3 = docs/latextut/Makefile docs/latextut/eg1.plt \
  82.     docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \
  83.     docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \
  84.     docs/latextut/header.tex docs/latextut/tutorial.tex
  85. # gnutex->gnuplot translator
  86. TSOURCE1 = translate/Makefile translate/README translate/command.c \
  87.     translate/eval.c translate/gnut2p.1 translate/internal.c \
  88.     translate/misc.c translate/parse.c translate/plot.c
  89. TSOURCE2 = \
  90.     translate/plot.h translate/scanner.c translate/standard.c \
  91.     translate/test1 translate/test2 translate/util.c
  92.  
  93. all:    gnuplot doc
  94.  
  95. gnuplot: $(OBJS) version.o
  96.     $(CC) $(CFLAGS) $(OBJS) version.o $(LIBS) -o gnuplot
  97.  
  98. doc:
  99.     ( cd docs; make gnuplot.gih )
  100.  
  101. translate:
  102.     (cd translate; make)
  103.  
  104. install: gnuplot doc man_install
  105.     cp gnuplot lasergnu $(DEST)
  106.     strip $(DEST)/gnuplot
  107.     (cd docs; make install-unix HELPDEST=$(HELPDEST))
  108.  
  109. man_install: docs/gnuplot.1 docs/lasergnu.1
  110.     cp docs/gnuplot.1 docs/lasergnu.1 $(MANDEST)
  111.  
  112. term.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  113.     $(CC) $(CFLAGS) $(TERMFLAGS) -c term.c
  114.  
  115. version.o:
  116.     $(CC) $(CFLAGS) -DCONTACT=$(EMAIL) -c version.c
  117.  
  118. $(OBJS): plot.h
  119.  
  120. command.o:
  121.     $(CC) $(CFLAGS) -c command.c -DHELPFILE=\"$(HELPDEST)\"
  122.  
  123. command.o help.o misc.o: help.h
  124.  
  125. command.o graphics.o misc.o plot.o setshow.o term.o: setshow.h
  126.  
  127. bitmap.o term.o: bitmap.h
  128.  
  129. SOURCES=plot.h help.h setshow.h bitmap.h term.h $(CSOURCE1) $(CSOURCE2) \
  130.     $(CSOURCE3) $(CSOURCE4) $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  131.  
  132. lint:
  133.     lint -hx $(SOURCES)
  134.  
  135. clean:
  136.     rm -f *.o *~ term/*~
  137.     (cd docs; make clean)
  138.     (cd docs/latextut; make clean)
  139.     (cd translate; make clean)
  140.  
  141. spotless:
  142.     rm -f *.o *~ term/*~ TAGS gnuplot
  143.     (cd docs; make clean)
  144.     (cd docs/latextut; make spotless)
  145.     (cd translate; make spotless)
  146.  
  147. shar: gnuplot.sh00 gnuplot.sh01 gnuplot.sh02 gnuplot.sh03 gnuplot.sh04 \
  148.     gnuplot.sh05 gnuplot.sh06 gnuplot.sh07 gnuplot.sh08 \
  149.     gnuplot.sh09 gnuplot.sh10 gnuplot.sh11 gnuplot.sh12 \
  150.     gnuplot.sh13 gnuplot.sh14
  151.  
  152. gnuplot.sh00:
  153.     echo '#!/bin/sh' > gnuplot.sh00
  154.     echo '# This is a shell file to make directories' >> gnuplot.sh00
  155.     echo mkdir $(DIRS) >> gnuplot.sh00
  156.  
  157. gnuplot.sh01: $(ETC)
  158.     shar $(ETC) > gnuplot.sh01
  159.  
  160. gnuplot.sh02: $(DOCS1)
  161.     shar $(DOCS1) > gnuplot.sh02
  162.  
  163. gnuplot.sh03: $(DOCS2)
  164.     shar $(DOCS2) > gnuplot.sh03
  165.  
  166. gnuplot.sh04: $(DOCS3)
  167.     shar $(DOCS3) > gnuplot.sh04
  168.  
  169. gnuplot.sh05: $(CSOURCE1)
  170.     shar $(CSOURCE1) > gnuplot.sh05
  171.  
  172. gnuplot.sh06: $(CSOURCE2)
  173.     shar $(CSOURCE2) > gnuplot.sh06
  174.  
  175. gnuplot.sh07: $(CSOURCE3)
  176.     shar $(CSOURCE3) > gnuplot.sh07
  177.  
  178. gnuplot.sh08: $(CSOURCE4)
  179.     shar $(CSOURCE4) > gnuplot.sh08
  180.  
  181. gnuplot.sh09: $(CSOURCE5)
  182.     shar $(CSOURCE5) > gnuplot.sh09
  183.  
  184. gnuplot.sh10: $(CSOURCE6)
  185.     shar $(CSOURCE6) > gnuplot.sh10
  186.  
  187. gnuplot.sh11: $(CSOURCE7)
  188.     shar $(CSOURCE7) > gnuplot.sh11
  189.  
  190. gnuplot.sh12: $(PC)
  191.     shar $(PC) > gnuplot.sh12
  192.  
  193. gnuplot.sh13: $(TSOURCE1)
  194.     shar $(TSOURCE1) > gnuplot.sh13
  195.  
  196. gnuplot.sh14: $(TSOURCE2)
  197.     shar $(TSOURCE2) > gnuplot.sh14
  198.  
  199.