home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / graphics-0.17 / plot2ps / Makefile < prev    next >
Encoding:
Makefile  |  1991-03-11  |  3.3 KB  |  110 lines

  1. # This is the Makefile for plot2ps, a plot file to postscript converter.
  2. #
  3. ##############################################################################
  4. #
  5. # Uncomment DEF if you need verbose debugging information embeded in
  6. # the postscript comments in the output file. You should still be
  7. # able to both print the output on a postscript device or view it using
  8. # idraw.
  9. #
  10. ##############################################################################
  11. #
  12. #DEF = -DDEBUG
  13. GETOPT=../getopt
  14. CC=gcc
  15. CFLAGS=-g
  16. #
  17. #----------------------------------------------------------------
  18. .PHONY: dist clean install
  19. # The toplevel make file uses these.
  20. .PHONY: all install clean realclean
  21.  
  22. all : plot2ps
  23.  
  24. VERS=0.4
  25. .c.o:
  26.     $(CC) $(CFLAGS) $(DEF) -I$(GETOPT) -I../include -DVERS=\"$(VERS)\" -c $<
  27.  
  28. install : plot2ps
  29.     install -c plot2ps $(BINDIR)
  30.     install -c plot2ps.man $(MANDIR)/plot2ps.$(MANEXT)
  31.  
  32. #
  33. # Type `make clean' to clean up after compilation.
  34. #
  35. clean:
  36.     -rm -f *.o *~ \#* core TAGS
  37. realclean : clean
  38.     -rm -f plot2ps *.a
  39. #----------------------------------------------------------------
  40. #
  41. # Type `make plot2ps' to compile plot2ps.
  42. #
  43.  
  44. plot2ps : plot.o $(GETOPT)/getopt.o $(GETOPT)/getopt1.o libps.a
  45.     $(CC) $(CFLAGS) -o plot2ps plot.o  $(GETOPT)/getopt.o $(GETOPT)/getopt1.o libps.a -lm
  46.  
  47. $(GETOPT)/getopt.o $(GETOPT)/getopt1.o : $(GETOPT)/getopt.c $(GETOPT)/getopt1.c
  48.     cd $(GETOPT); make all CC="$(CC)" CFLAGS="$(CFLAGS)"
  49. $(GETOPT)/getopt.o : $(GETOPT)/getopt.h $(GETOPT)/getopt.h
  50. $(GETOPT)/getopt1.o : $(GETOPT)/getopt.h $(GETOPT)/getopt.h
  51. #
  52. # Type `make libps.a' to creaate the plot compatible library of
  53. # functions for postscript output.
  54. #
  55. LSRC = open.c close.c space.c rotate.c dot.c point.c \
  56. linemod.c line.c label.c alabel.c erase.c color.c move.c cont.c \
  57. arc.c circle.c drawline.c header.c setfont.c fontsize.c fill.c \
  58. range.c
  59.  
  60. LOBJ = open.o close.o space.o rotate.o dot.o point.o \
  61. linemod.o line.o label.o alabel.o erase.o color.o move.o cont.o \
  62. arc.o circle.o drawline.o header.o setfont.o fontsize.o fill.o \
  63. range.o
  64.  
  65. libps.a : $(LOBJ)
  66.     ar ru libps.a $?
  67.     ranlib libps.a
  68.  
  69. #
  70. # Type `make TAGS' to update the TAGS file for use with GNU emacs.
  71. #
  72. TAGS : plot.c $(LSRC) ../include/libplot.h
  73.     etags plot.c $(LSRC) ../include/libplot.h
  74.  
  75. #
  76. # This awk script can be used to build font width tables
  77. # from the font metric file.
  78. #
  79. .fonttable.afm:
  80.     echo >$@
  81.     echo "int *${i}-width = {" >$@
  82.     awk '/^C /{w[$2]= $5};END{for(i=0;i<256;i++){if (length(w[i])==0) printf ("0, "); else printf ("%d, ", w[i]);}}' <$< >$@
  83.     echo "0};" >$@
  84.     echo >$@
  85. #
  86. # Dependencies generated by gcc -MM *.c *.h:
  87. #
  88. alabel.o : alabel.c ../include/libplot.h
  89. arc.o : arc.c ../include/libplot.h
  90. box.o : box.c ../include/libplot.h
  91. circle.o : circle.c ../include/libplot.h
  92. close.o : close.c ../include/libplot.h
  93. color.o : color.c ../include/libplot.h
  94. cont.o : cont.c ../include/libplot.h
  95. dot.o : dot.c ../include/libplot.h
  96. drawline.o : drawline.c ../include/libplot.h
  97. erase.o : erase.c ../include/libplot.h
  98. header.o : header.c
  99. label.o : label.c ../include/libplot.h
  100. line.o : line.c ../include/libplot.h
  101. linemod.o : linemod.c ../include/libplot.h
  102. move.o : move.c ../include/libplot.h
  103. open.o : open.c ../include/libplot.h
  104. plot.o : plot.c ../include/libplot.h
  105. point.o : point.c ../include/libplot.h
  106. ppoint.o : ppoint.c ../include/libplot.h
  107. rotate.o : rotate.c ../include/libplot.h
  108. space.o : space.c ../include/libplot.h
  109. range.o : range.c ../include/libplot.h
  110.