Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.os9
1 #
2 # $Id: makefile.os9,v 1.4 2002/02/21 12:27:37 lhecking Exp $
3 #
4 # GNUPLOT Makefile for OS-9 and Ultra C, with X11 support
5 #
6 #   by Martijn Schipper 18-6-1996
7 #   schipper@iri.tudelft.nl
8 #
9 # Original version by:
10 #   oliveria@caen.engin.umich.edu
11 #   Wed, 3 Jul 91 14:31:37 -0400
12 #
13
14 # From here, check for right paths and flags
15 # Correct them, if You want
16
17 # Where to send email about bugs and comments 
18 EMAIL=schipper@iri.tudelft.nl
19
20 # where to place gnuplot.gih helpfile
21 HELPFILE = /dd/SYS/gnuplot.gih
22
23 # Installation of X11 support...
24 #
25 # Choose one of the following variants: X11 or no X11
26 # Install X11 support
27 PLOTXFLAG   = -DX11
28 GNUPLOT_X11 = gnuplot_X11
29 # Do not support X11
30 # GNUPLOT_X11 =
31 # PLOTXFLAG   =
32
33 # Compiler, must be ANSI compatible
34 LC     = cc
35 CC     = cc
36 RDIR = .
37 SDIR = /dd/PRJ/GNUPLOT
38
39 # macros for makefile.all
40 O = r
41 T = ../TERM/
42 D = ../DOCS/
43 L = ../DOCS/LATEXTUT
44 M = ../DEMO/
45
46 DEBUG = -g
47 #DEBUG =
48 CDFLAGS = -DOSK -DPIPES -DREADLINE -DHAVE_LOCALE $(PLOTXFLAG)
49 CFLAGS = $(DEBUG) -td=/h0 -tp=020ld $(CDFLAGS)
50 CCFLAGS = -eas=$(RDIR)
51
52 LFLAGS = -tp020scld $(DEBUG)
53
54 # see other terminal defines in term.h
55 TERMFLAGS = $(PLOTXFLAG)
56
57 # Where to write gnuplot and gnuplot_X11
58 ODIR   = /dd/USR/CMDS
59
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
63 LIBS = -l=sys_clib.l
64
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
68 SOCKLIB   = socklib.l
69 NETLIB    = netdb.l
70  
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)
74
75 # From here, things should be all right
76 ####################################################################
77
78 #
79 # make complete project
80 #
81 gnuplot.project: $(HELPFILE) $(GNUPLOT_X11) gnuplot bf_test $(M)binary1
82         echo "gnuplot ready to go!"
83
84 #
85 # convert gnuplot.doc to gnuplot.gih
86 #
87 $(HELPFILE): doc2gih $(D)gnuplot.doc
88         $(ODIR)/doc2gih <$(D)gnuplot.doc >-$(HELPFILE)
89         attr -pr $(HELPFILE)
90
91 doc2gih: $(RDIR)/doc2gih.$(O) $(RDIR)/termdoc.$(O) 
92         $(LC) $(LFLAGS) $(RDIR)/doc2gih.$(O) $(RDIR)/termdoc.$(O) -f=$(ODIR)/$@
93
94 $(RDIR)/doc2gih.$(O): $(D)doc2gih.c
95         $(CC) $(CFLAGS) $(CCFLAGS) -v=$(SDIR) -v=TERM $(D)doc2gih.c
96
97 $(RDIR)/termdoc.$(O): $(D)termdoc.c
98         $(CC) $(CFLAGS) $(CCFLAGS) -v=$(SDIR) -v=TERM $(D)termdoc.c
99
100 #
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
104 #
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)/$@
109
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
113
114 #
115 # Create binary datafiles for the binary demo
116 #
117 $(M)binary1 $(M)binary2 $(M)binary3: bf_test
118         (chd DEMO; bf_test)
119
120 BFTESTOBJS = $(RDIR)/bf_test.$(O) $(RDIR)/binary.$(O) $(RDIR)/alloc.$(O)
121
122 bf_test: $(BFTESTOBJS)
123         $(LC) $(LFLAGS) $(LIBS) $(BFTESTOBJS) -f=$(ODIR)/$@
124         attr -pepr $(ODIR)/$@
125
126 include makefile.all
127
128 OBJS = $(COREOBJS) os9.$(O) version.$(O)
129
130 #
131 # Link the gnuplot program
132 #
133 gnuplot: $(OBJS) 
134         $(LC) $(LFLAGS) -olM=64 $(OBJS) $(LIBS) -f=$(ODIR)/$@
135         attr -pepr $(ODIR)/$@
136
137 #
138 # Now, produce the object files
139 #
140
141 # include makefile.all for the second time for simple dependencies
142 include makefile.all
143
144 command.$(O): command.c
145         $(CC) $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $(CCFLAGS) command.c
146
147 show.$(O): show.c
148         $(CC) $(CFLAGS) -DHELPFILE=\"($HELPFILE)\" $(CCFLAGS) show.c
149
150 term.$(O): term.c $(CORETERM)
151         $(CC) $(CFLAGS) $(TERMFLAGS) -v=TERM -v=$(SDIR) $(CCFLAGS) term.c
152
153 version.$(O): version.c
154         $(CC) $(CFLAGS) -DCONTACT="$(EMAIL)" $(CCFLAGS) version.c
155
156 ### end ###