Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.vms
1 #
2 # $Id: makefile.vms,v 1.11 2000/01/22 16:39:55 lhecking Exp $
3 #
4 # GNUPLOT Makefile for VMS
5 #
6 # use with the MAKE that was posted by Tony Ivanov (tony@gvgpvd.GVG.TEK.COM)
7 # in comp.os.vms on 5 December 1988
8 #
9 # Modified 23 June 1999 to work with MMK; it should also work with MMS.
10 # John.Hasstedt@sunysb.edu.
11 #
12 # You can define a macro on the command line to specify the compiler, either
13 # VAXC or GNUC; if you do not specify either, it uses DECC.  If you are
14 # compiling on Alpha, you should also define __ALPHA__ (MMK does this for you,
15 # for MMS, use MMS/DESCRIP=MAKEFILE.VMS/MACRO=__ALPHA__).
16
17 ########### COMPILE OPTIONS ###########
18
19 .IFDEF VAXC
20 CC=CC
21 WHICHRTL=VAXCRTL
22 CRTL_SHARE=,sys$$disk:[]linkopt.vms/opt
23 PREFIXALL=
24 CRTL_SHARE=
25 EXTRADEFS=
26 EXTRAOBJ=
27 EXTRALIB=
28 .ELSE
29 .IFDEF GNUC
30 CC=GCC
31 WHICHRTL=VAXCRTL
32 CRTL_SHARE=,sys$$disk:[]linkopt.vms/opt
33 PREFIXALL=
34 CRTL_SHARE=
35 EXTRADEFS=
36 EXTRAOBJ=
37 EXTRALIB=,gnu_cc:[000000]gcclib/lib
38 .ELSE  # DECC
39 CC=CC
40 WHICHRTL=DECCRTL
41 PREFIXALL=/prefix=all
42 CRTL_SHARE=
43 .IFDEF __ALPHA__
44 EXTRADEFS=,HAVE_SLEEP,HAVE_GETCWD,HAVE_LGAMMA,HAVE_UNISTD_H
45 .ELSE
46 EXTRADEFS=,HAVE_SLEEP,HAVE_GETCWD,HAVE_UNISTD_H
47 EXTRAOBJ=
48 EXTRALIB=
49 .ENDIF
50 .ENDIF
51
52 #maybe ABJ and AXE if that's your local convention for alpha
53 #(that's how I build vax and axp programs in same directory)
54 O=OBJ
55 X=EXE
56
57 # NOOP  NO Optimiser
58 # take out X11 if you dont want windows support
59 # pipes compiles with popen emulation (from VMS perl-5 port)
60 CFLAGS = /define=(NO_GIH,X11,PIPES$(EXTRADEFS),$(WHICHRTL)) $(PREFIXALL)
61 TERMFLAGS = /include=[-.term]
62
63
64 ############## okay, that's enough fiddling ###############
65
66 OBJS1 = alloc.$(O),binary.$(O),bitmap.$(O),command.$(O),contour.$(O),datafile.$(O),dynarray.$(O),eval.$(O),
67 OBJS2 = fit.$(O),graphics.$(O),graph3d.$(O),help.$(O),hidden3d.$(O),internal.$(O),interpol.$(O),
68 OBJS3 = matrix.$(O),misc.$(O),parse.$(O),plot.$(O),plot2d.$(O),plot3d.$(O),scanner.$(O),set.$(O),history.$(O),
69 OBJS4 = show.$(O),specfun.$(O),standard.$(O),stdfn.$(O),term.$(O),time.$(O),util.$(O),util3d.$(O),version.$(O),vms.$(O),variable.$(O),save.$(O),tables.$(O),unset.$(O)
70 OBJS = $(OBJS1)$(OBJS2)$(OBJS3)$(OBJS4)$(EXTRAOBJ)
71
72 CSOURCE1 = command.c set.c show.c variable.c
73 CSOURCE2 = help.c graphics.c graph3d.c internal.c
74 CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.c plot3d.c scanner.c standard.c stdfn.c
75 CSOURCE4 = bitmap.c term.c time.c util.c version.c interpol.c fit.c matrix.c
76 CSOURCE5 = [-.term]aed.trm [-.term]cgi.trm [-.term]dumb.trm [-.term]dxf.trm [-.term]dxy.trm \
77         [-.term]eepic.trm [-.term]epson.trm [-.term]fig.trm [-.term]hp26.trm \
78         [-.term]hp2648.trm [-.term]hpgl.trm [-.term]hpljii.trm
79 CSOURCE6 = [-.term]impcodes.h [-.term]imagen.trm [-.term]object.h \
80         [-.term]iris4d.trm [-.term]kyo.trm [-.term]latex.trm [-.term]pbm.trm  \
81         [-.term]pc.trm
82 CSOURCE7 = [-.term]post.trm [-.term]qms.trm [-.term]regis.trm [-.term]sun.trm \
83         [-.term]t410x.trm [-.term]tek.trm [-.term]unixpc.trm [-.term]unixplot.trm \
84         [-.term]v384.trm [-.term]x11.trm gplt_x11.c
85 CSOURCE8 = contour.c specfun.c interpol.c vms.c dynarray.c
86
87 all :   gnuplot.$(X) gnuplot_x11.$(X) gnuplot.hlp gnuplot.hlb \
88         [-.demo]binary1. [-.demo]binary2. [-.demo]binary3.
89         @       ! a no-op to suppress a MMS warning
90
91 gnuplot.$(X) : $(OBJS) $(EXTRAOBJ)
92         link /exe=gnuplot.$(X) vms.$(O),gnuplot.opt/opt$(EXTRAOBJ)$(EXTRALIB)$(CRTL_SHARE)
93
94 gnuplot_x11.$(X) : gplt_x11.$(O) stdfn.$(O)
95         link /exe=gnuplot_x11.$(X) gplt_x11.$(O),stdfn.$(O),x11.opt/option$(CRTL_SHARE)
96
97 gplt_x11.o : gplt_x11.c
98         $(CC) $(CFLAGS) $(X11FLAGS)
99
100 [-.demo]binary1. [-.demo]binary2. [-.demo]binary3. : bf_test.$(X)
101         set default [-.demo]
102         run [-.src]bf_test.$(X)
103         set default [-.src]
104
105 bf_test.$(X) : bf_test.$(O) binary.$(O) alloc.$(O)
106         link /exe=bf_test.exe bf_test.$(O),binary.$(O),alloc.$(O)
107
108 gnuplot.hlb : gnuplot.hlp
109         library/create/help gnuplot.hlb gnuplot.hlp
110
111 .IFDEF OLD_HLP
112 gnuplot.hlp : doc2hlp.$(X) [-.docs]gnuplot.doc
113         define/user sys$input [-.docs]gnuplot.doc
114         define/user sys$output []gnuplot.hlp
115         run doc2hlp
116
117 doc2hlp.$(X) : [-.docs]doc2hlp.c [-.docs]termdoc.c
118         $(CC) /include=([-.docs],[],[-.term]) [-.docs]doc2hlp.c,[-.docs]termdoc.c
119         link /exe=doc2hlp.$(X) doc2hlp,termdoc$(CRTL_SHARE)
120 .ELSE
121 gnuplot.hlp : [-.docs]gnuplot.rnh
122         RUNOFF $< /OUTPUT=$@
123
124 [-.docs]gnuplot.rnh : [-.docs]doc2rnh.$(X) [-.docs]gnuplot.doc
125         MCR $< [-.docs]gnuplot.doc $@
126
127 [-.docs]doc2rnh.$(X) : [-.docs]doc2rnh.$(O) [-.docs]termdoc.$(O)
128         link /exe=$@  $+ $(CRTL_SHARE)
129
130 [-.docs]doc2rnh.$(O) [-.docs]termdoc.$(O) : [-.docs]termdoc.c ![-.docs]allterm.h
131         $(CC) /OBJ=$@ $(CFLAGS) /INCLUDE=([],[-.TERM]) $*.c
132 .ENDIF
133
134 term.$(O) : term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
135         $(CC) $(CFLAGS) $(TERMFLAGS) term.c /object=term.$(O)
136
137 $(OBJS) : plot.h
138
139 command.$(O) help.$(O) misc.$(O) : help.h
140
141 command.$(O) graphics.$(O) graph3d.$(O) misc.$(O) plot.$(O) set.$(O) show.$(O) term.O interpol.$(O) : setshow.h
142
143 command.$(O) fit.$(O) matrix.$(O) : fit.h
144
145 fit.$(O) matrix.$(O) : matrix.h
146
147 bitmap.$(O) term.$(O) : bitmap.h
148
149 clean :
150         purge/log
151         delete/log *.$(O);*
152         delete/log [-.demo]binary1.;*,binary2.;*,binary3.;*