1# 2# $Id: makefile.vms,v 1.16 2013/10/25 03:10:28 sfeam 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 20CC=CC 21WHICHRTL=VAXCRTL 22CRTL_SHARE=,sys$$disk:[]linkopt.vms/opt 23PREFIXALL= 24CRTL_SHARE= 25EXTRADEFS= 26EXTRAOBJ= 27EXTRALIB= 28.ELSE 29.IFDEF GNUC 30CC=GCC 31WHICHRTL=VAXCRTL 32CRTL_SHARE=,sys$$disk:[]linkopt.vms/opt 33PREFIXALL= 34CRTL_SHARE= 35EXTRADEFS= 36EXTRAOBJ= 37EXTRALIB=,gnu_cc:[000000]gcclib/lib 38.ELSE # DECC 39CC=CC 40WHICHRTL=DECCRTL 41PREFIXALL=/prefix=all 42CRTL_SHARE= 43.IFDEF __ALPHA__ 44EXTRADEFS=,HAVE_SLEEP,HAVE_GETCWD,HAVE_LGAMMA,HAVE_UNISTD_H 45.ELSE 46EXTRADEFS=,HAVE_SLEEP,HAVE_GETCWD,HAVE_UNISTD_H 47EXTRAOBJ= 48EXTRALIB= 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) 54O=OBJ 55X=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) 60CFLAGS = /define=(NO_GIH,X11,PIPES$(EXTRADEFS),$(WHICHRTL)) $(PREFIXALL) 61TERMFLAGS = /include=[-.term] 62 63 64############## okay, that's enough fiddling ############### 65 66OBJS1 = alloc.$(O),binary.$(O),bitmap.$(O),command.$(O),contour.$(O),datafile.$(O),dynarray.$(O),eval.$(O), 67OBJS2 = fit.$(O),graphics.$(O),graph3d.$(O),help.$(O),hidden3d.$(O),internal.$(O),interpol.$(O), stats.$(O), 68OBJS3 = matrix.$(O),misc.$(O),parse.$(O),plot.$(O),plot2d.$(O),plot3d.$(O),scanner.$(O),set.$(O),history.$(O), 69OBJS4 = 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) 70OBJS = $(OBJS1)$(OBJS2)$(OBJS3)$(OBJS4)$(EXTRAOBJ) 71 72CSOURCE1 = command.c set.c show.c variable.c 73CSOURCE2 = help.c graphics.c graph3d.c internal.c 74CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.c plot3d.c scanner.c standard.c stdfn.c 75CSOURCE4 = bitmap.c term.c time.c util.c version.c interpol.c fit.c matrix.c stats.c 76CSOURCE5 = [-.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 79CSOURCE6 = [-.term]impcodes.h [-.term]imagen.trm [-.term]object.h \ 80 [-.term]kyo.trm [-.term]latex.trm [-.term]pbm.trm \ 81 [-.term]pc.trm 82CSOURCE7 = [-.term]post.trm [-.term]qms.trm [-.term]regis.trm \ 83 [-.term]t410x.trm [-.term]tek.trm \ 84 [-.term]x11.trm gplt_x11.c 85CSOURCE8 = contour.c specfun.c interpol.c vms.c dynarray.c 86 87all : 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 91gnuplot.$(X) : $(OBJS) $(EXTRAOBJ) 92 link /exe=gnuplot.$(X) vms.$(O),gnuplot.opt/opt$(EXTRAOBJ)$(EXTRALIB)$(CRTL_SHARE) 93 94gnuplot_x11.$(X) : gplt_x11.$(O) stdfn.$(O) 95 link /exe=gnuplot_x11.$(X) gplt_x11.$(O),stdfn.$(O),x11.opt/option$(CRTL_SHARE) 96 97gplt_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 105bf_test.$(X) : bf_test.$(O) binary.$(O) alloc.$(O) 106 link /exe=bf_test.exe bf_test.$(O),binary.$(O),alloc.$(O) 107 108gnuplot.hlb : gnuplot.hlp 109 library/create/help gnuplot.hlb gnuplot.hlp 110 111.IFDEF OLD_HLP 112gnuplot.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 117doc2hlp.$(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 121gnuplot.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 134term.$(O) : term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) 135 $(CC) $(CFLAGS) $(TERMFLAGS) term.c /object=term.$(O) 136 137$(OBJS) : plot.h 138 139command.$(O) help.$(O) misc.$(O) : help.h 140 141command.$(O) graphics.$(O) graph3d.$(O) misc.$(O) plot.$(O) set.$(O) show.$(O) term.O interpol.$(O) : setshow.h 142 143command.$(O) fit.$(O) matrix.$(O) : fit.h 144 145fit.$(O) matrix.$(O) : matrix.h 146 147bitmap.$(O) term.$(O) : bitmap.h 148 149clean : 150 purge/log 151 delete/log *.$(O);* 152 delete/log [-.demo]binary1.;*,binary2.;*,binary3.;* 153