1# Makefile for widget demo programs 2 3MOTIFLIBS = -lXm -lXmu -lXt -lX11 -lm 4CFLAGS = $(DEFINES) $(CDEBUGFLAGS) 5CDEBUGFLAGS = 6DEFINES = 7RM = rm -f 8 9WIDGET = SciPlot 10PROGRAMS = sciplot realtime 11TARFILE = sciplot 12 13SRCS = SciPlot.c plotutil.c reader.c strutil.c xyplot.c realtime.c 14HDRS = SciPlot.h SciPlotP.h plotutil.h reader.h strutil.h 15OBJS = $(SRCS:.c=.o) 16PLOTSRCS = SciPlot.c plotutil.c reader.c strutil.c xyplot.c 17PLOTOBJS= $(PLOTSRCS:.c=.o) 18RTSRCS = SciPlot.c plotutil.c reader.c strutil.c realtime.c 19RTOBJS= $(RTSRCS:.c=.o) 20 21DOCS = SciPlot. SciPlotProg. SciPlotDemo. 22HOBJS = $(DOCS:.=.html) 23HSRCS = $(DOCS:.=.hdoc) 24 25INFOFILES = CHANGES LICENSE README Makefile.noImake Imakefile data.txt 26 27MANPAGES = $(INFOFILES) $(HOBJS) *.gif 28 29VERSION = $(SRCS) $(HDRS) $(MANPAGES) 30TARFILES = $(VERSION) $(HSRCS) 31 32 33########################################################################## 34# Definitions for generating the documentation 35HDOC = /usr/local/bin/hdoc 36.SUFFIXES: .html .hdoc 37.hdoc.html: 38 $(HDOC) $*.hdoc > $*.html 39 40 41########################################################################## 42# Definitions for building the program 43 44 45all:: sciplot realtime 46 47sciplot: $(PLOTOBJS) 48 $(RM) $@ 49 $(CC) -o $@ $(PLOTOBJS) $(LDOPTIONS) $(MOTIFLIBS) 50 51realtime: $(RTOBJS) 52 $(RM) $@ 53 $(CC) -o $@ $(RTOBJS) $(LDOPTIONS) $(MOTIFLIBS) 54 55doc: $(HOBJS) $(HDOC) 56 @echo "Updated html." 57 58clean:: 59 $(RM) $(PROGRAMS) $(OBJS) 60 61version: 62 -@STUFF=../$(WIDGET)-`fgrep _WIDGET_VERSION $(WIDGET).h|cut -f2`;\ 63 echo Making version directory $$STUFF ;\ 64 mkdir $$STUFF ;\ 65 cp $(VERSION) $$STUFF ;\ 66 ls -l $$STUFF 67 68tar: 69 rm -f $(TARFILE).tar $(TARFILE).tar.gz 70 tar cfv $(TARFILE).tar $(TARFILES) 71 gzip $(TARFILE).tar 72 73taz: $(SRCS) 74 rm -f $(TARFILE).tar $(TARFILE).tar.gz 75 tar cfv $(TARFILE).tar $(TARFILES) 76 compress $(TARFILE).tar 77