1XCOMM Imakefile for widget demo programs
2
3#ifdef LinuxArchitecture
4    CC = gcc
5    EXTRA_DEFINES = -g -Wall
6    CDEBUGFLAGS = -m486
7    LESSTIF = -L/home/rob/src/lesstif/libXm
8    HDOC = ~/public_html/hdoc
9#endif
10#ifdef AIXArchitecture
11    CC = c89
12    EXTRA_DEFINES = -g
13    CDEBUGFLAGS =
14    HDOC = hdoc
15#endif
16#ifdef AlphaArchitecture
17#   CC = cc -std1
18#endif
19
20# MOTIF = $(LESSTIF) -lXm
21
22MOTIFDEPS = $(DEPXMLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
23MOTIFLIBS = $(MOTIFLIB) $(XTOOLONLYLIB) $(XONLYLIB)
24SYS_LIBRARIES = -lm
25CDEBUGFLAGS =
26
27WIDGET = SciPlot
28PROGRAMS = sciplot realtime
29TARFILE = sciplot
30
31SONUM = 0
32SONAME = $(LIBNAME).so
33
34SRCS = SciPlot.c SciPlotUtil.c xyplot.c realtime.c
35HDRS = SciPlot.h SciPlotP.h SciPlotUtil.h
36OBJS = $(SRCS:.c=.o)
37PLOTSRCS = SciPlot.c SciPlotUtil.c xyplot.c
38PLOTOBJS= $(PLOTSRCS:.c=.o)
39RTSRCS = SciPlot.c SciPlotUtil.c realtime.c
40RTOBJS= $(RTSRCS:.c=.o)
41
42DOCS = SciPlot. SciPlotProg. SciPlotDemo. gpl.
43HOBJS = $(DOCS:.=.html)
44HSRCS = $(DOCS:.=.hdoc)
45
46INFOFILES = ANNOUNCE CHANGES LICENSE README Makefile.noImake Imakefile data.txt
47
48MANPAGES = $(INFOFILES) $(HOBJS) *.gif
49
50VERSION = $(SRCS) $(HDRS) $(MANPAGES)
51TARFILES = $(VERSION) $(HSRCS)
52
53XCOMM ##########################################################################
54XCOMM Definitions for generating the documentation
55.SUFFIXES:	.html .hdoc
56.hdoc.html:
57	$(HDOC) $*.hdoc > $*.html
58
59
60AllTarget(sciplot realtime libs)
61
62NormalProgramTarget(sciplot,$(PLOTOBJS),$(MOTIFDEPS),$(MOTIFLIBS),$(SYS_LIBRARIES))
63NormalProgramTarget(realtime,$(RTOBJS),$(MOTIFDEPS),$(MOTIFLIBS),$(SYS_LIBRARIES))
64
65doc:	$(HOBJS) $(HDOC)
66	@echo "Updated html."
67
68version:
69	-@STUFF=../$(WIDGET)-`fgrep _WIDGET_VERSION $(WIDGET).h|cut -f2`;\
70	echo Making version directory $$STUFF ;\
71	mkdir $$STUFF ;\
72	cp $(VERSION) $$STUFF ;\
73	ls -l $$STUFF
74
75tar:
76	rm -f $(TARFILE).tar $(TARFILE).tar.gz
77	tar cfv $(TARFILE).tar $(TARFILES)
78	gzip $(TARFILE).tar
79
80taz:	$(SRCS)
81	rm -f $(TARFILE).tar $(TARFILE).tar.gz
82	tar cfv $(TARFILE).tar $(TARFILES)
83	compress $(TARFILE).tar
84
85libs:	$(PLOTOBJS)
86	$(AR) $(LIBNAME).a $(WIDGET).o $(WIDGET)Util.o
87	$(RANLIB) $(LIBNAME).a
88	$(CC) $(SHLIBLDFLAGS) -o $(SONAME).$(SONUM) -Wl,-soname,${SONAME} $(WIDGET).o $(WIDGET)Util.o	\
89		$(LDFLAGS) $(MOTIFLIBS) $(LDLIBS)
90
91# Dependencies:
92
93SciPlot.o: SciPlot.c SciPlotP.h SciPlot.h
94SciPlotUtil.o: SciPlotUtil.c SciPlotUtil.h
95xyplot.o: xyplot.c SciPlot.h SciPlotUtil.h
96realtime.o: realtime.c SciPlot.h SciPlotUtil.h
97libsciplot.a: SciPlot.h SciPlotP.h SciPlotUtil.h SciPlot.c SciPlotUtil.c
98