2 # $Id: makefile.os9,v 1.4 2002/02/21 12:27:37 lhecking Exp $
4 # GNUPLOT Makefile for OS-9 and Ultra C, with X11 support
6 # by Martijn Schipper 18-6-1996
7 # schipper@iri.tudelft.nl
10 # oliveria@caen.engin.umich.edu
11 # Wed, 3 Jul 91 14:31:37 -0400
14 # From here, check for right paths and flags
15 # Correct them, if You want
17 # Where to send email about bugs and comments
18 EMAIL=schipper@iri.tudelft.nl
20 # where to place gnuplot.gih helpfile
21 HELPFILE = /dd/SYS/gnuplot.gih
23 # Installation of X11 support...
25 # Choose one of the following variants: X11 or no X11
28 GNUPLOT_X11 = gnuplot_X11
33 # Compiler, must be ANSI compatible
37 SDIR = /dd/PRJ/GNUPLOT
39 # macros for makefile.all
48 CDFLAGS = -DOSK -DPIPES -DREADLINE -DHAVE_LOCALE $(PLOTXFLAG)
49 CFLAGS = $(DEBUG) -td=/h0 -tp=020ld $(CDFLAGS)
50 CCFLAGS = -eas=$(RDIR)
52 LFLAGS = -tp020scld $(DEBUG)
54 # see other terminal defines in term.h
55 TERMFLAGS = $(PLOTXFLAG)
57 # Where to write gnuplot and gnuplot_X11
60 # Give UNIX compatibility library
61 # Obsolete, Unix functions now in os9.c
62 #LIBS = -l=/dd/USR/LIB/unixlib.l -l=sys_clib.l
65 # Where to find X-Window and socket libs
66 XLIB = /dd/MWOS/OS9/68020/LIB/X11/libX11.l
67 UFLIB = /dd/MWOS/OS9/68020/LIB/X11/uf.l
71 # X11FLAGS and X11LIBS for linking with cc, obsolete for no X11 support
72 X11FLAGS = $(DEBUG) -m=64
73 X11LIBS = -l=$(XLIB) -l=$(UFLIB) -l=$(NETLIB) -l=$(SOCKLIB)
75 # From here, things should be all right
76 ####################################################################
79 # make complete project
81 gnuplot.project: $(HELPFILE) $(GNUPLOT_X11) gnuplot bf_test $(M)binary1
82 echo "gnuplot ready to go!"
85 # convert gnuplot.doc to gnuplot.gih
87 $(HELPFILE): doc2gih $(D)gnuplot.doc
88 $(ODIR)/doc2gih <$(D)gnuplot.doc >-$(HELPFILE)
91 doc2gih: $(RDIR)/doc2gih.$(O) $(RDIR)/termdoc.$(O)
92 $(LC) $(LFLAGS) $(RDIR)/doc2gih.$(O) $(RDIR)/termdoc.$(O) -f=$(ODIR)/$@
94 $(RDIR)/doc2gih.$(O): $(D)doc2gih.c
95 $(CC) $(CFLAGS) $(CCFLAGS) -v=$(SDIR) -v=TERM $(D)doc2gih.c
97 $(RDIR)/termdoc.$(O): $(D)termdoc.c
98 $(CC) $(CFLAGS) $(CCFLAGS) -v=$(SDIR) -v=TERM $(D)termdoc.c
101 # For X11 support generate gnuplot_X11
102 # I have only old X11 R4 libraries, that is the reason for using compatability
103 # mode for compiling and linking gnuplot_x11
105 gnuplot_X11: $(RDIR)/gplt_x11.$(O)
106 $(LC) -mode=compat $(DEBUG) -q -m=64 $(X11LIBS) $(RDIR)/gplt_x11.$(O) \
107 $(RDIR)/stdfn.$(O) -n=$@ -f=$(ODIR)/$@
108 attr -pepr $(ODIR)/$@
110 $(RDIR)/gplt_x11.$(O): gplt_x11.c
111 $(CC) -mode=compat -t=/r0 -q $(DEBUG) -DOS9 -v=/dd/MWOS/SRC/DEFS/X11 \
112 -v=/dd/MWOS/SRC/DEFS/ELTEC $(CDFLAGS) -r=$(RDIR) gplt_x11.c
115 # Create binary datafiles for the binary demo
117 $(M)binary1 $(M)binary2 $(M)binary3: bf_test
120 BFTESTOBJS = $(RDIR)/bf_test.$(O) $(RDIR)/binary.$(O) $(RDIR)/alloc.$(O)
122 bf_test: $(BFTESTOBJS)
123 $(LC) $(LFLAGS) $(LIBS) $(BFTESTOBJS) -f=$(ODIR)/$@
124 attr -pepr $(ODIR)/$@
128 OBJS = $(COREOBJS) os9.$(O) version.$(O)
131 # Link the gnuplot program
134 $(LC) $(LFLAGS) -olM=64 $(OBJS) $(LIBS) -f=$(ODIR)/$@
135 attr -pepr $(ODIR)/$@
138 # Now, produce the object files
141 # include makefile.all for the second time for simple dependencies
144 command.$(O): command.c
145 $(CC) $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $(CCFLAGS) command.c
148 $(CC) $(CFLAGS) -DHELPFILE=\"($HELPFILE)\" $(CCFLAGS) show.c
150 term.$(O): term.c $(CORETERM)
151 $(CC) $(CFLAGS) $(TERMFLAGS) -v=TERM -v=$(SDIR) $(CCFLAGS) term.c
153 version.$(O): version.c
154 $(CC) $(CFLAGS) -DCONTACT="$(EMAIL)" $(CCFLAGS) version.c