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.3b1 < prev    next >
Makefile  |  1991-02-05  |  5KB  |  149 lines

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