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

  1. # This is the Makefile for graph, a program which generates plot files.
  2. defines = # -DSTDC_HEADERS -DHAVE_VOIDPTR -ansi
  3. #CC = gcc
  4. #COPTS = -g -Wall
  5. CC = cc
  6. COPTS = -O
  7. CFLAGS = $(COPTS) $(defines)
  8. LDFLAGS = -g
  9. LDLIBS=-lm
  10. GETOPT=../getopt
  11. #----------------------------------------------------------------
  12. # The toplevel make file uses these.
  13. .PHONY: all install clean realclean
  14.  
  15. all : graph
  16.  
  17. VERS=0.15
  18. .c.o:
  19.     $(CC) $(CFLAGS) -I$(GETOPT) -I../include -DVERS=\"$(VERS)\" -c $<
  20.  
  21. graph : graph.o read_file.o max.o write_plot.o $(GETOPT)/getopt.o $(GETOPT)/getopt1.o ../tek2plot/libplot.a
  22.     $(CC) $(CFLAGS) graph.o read_file.o max.o write_plot.o $(GETOPT)/getopt.o $(GETOPT)/getopt1.o ../tek2plot/libplot.a $(LDLIBS) -o graph
  23.  
  24. ../tek2plot/libplot.a :
  25.     cd ../tek2plot; make libplot.a CC="$(CC)" CFLAGS="$(CFLAGS)"
  26.  
  27. $(GETOPT)/getopt.o $(GETOPT)/getopt1.o : $(GETOPT)/getopt.c $(GETOPT)/getopt1.c
  28.     cd $(GETOPT); make all CC="$(CC)" CFLAGS="$(CFLAGS)"
  29.  
  30. graph.o : graph.c extern.h ../include/libplot.h 
  31. max.o : max.c extern.h 
  32. read_file.o : read_file.c extern.h 
  33. write_plot.o : write_plot.c ../include/libplot.h extern.h 
  34. $(GETOPT)/getopt.o : $(GETOPT)/getopt.h $(GETOPT)/getopt.h
  35. $(GETOPT)/getopt1.o : $(GETOPT)/getopt.h $(GETOPT)/getopt.h
  36. #----------------------------------------------------------------
  37. TAGS : graph.c read_file.c max.c write_plot.c extern.h ../include/libplot.h
  38.     etags graph.c read_file.c max.c write_plot.c extern.h ../include/libplot.h
  39. install :
  40.     install -c graph $(BINDIR)
  41.  
  42. clean :
  43.     -rm -f *.o *~ \#* core test* data* TAGS
  44. realclean : clean
  45.     -rm -f graph *.a
  46.