# Makefile for "example"- example program using MAD and DASH MADDIR = /macro/users/kearns/mad DASHDIR = /macro/users/kearns/dash CERNDIR = /sgibin/cernlib/cern/pro/lib FFLAGS = -g -O0 -static LOADLIBES = -L$(MADDIR) -lmad \ -L$(DASHDIR) -ldash \ -L$(CERNDIR) -lpacklib -lkernlib FOBJS = example.f example: $(FOBJS) $(FC) -g -o example $(FOBJS) $(LOADLIBES)
Under VMS, the linking can be handled by the DASHLINK command, which is created as a symbol if you execute DASH_SETUP.COM in the DASH directory. Alternatively, you may create your own com-file to handle linking. If you do use DASHLINK, you provide an options file that lists all the code (modules, private libraries) you wish to link in (as explained in section 4.1. The rather trivial options file for the example program consists of:
EXAMPLE,DISK$MACRO2:[MACROUSA.MAD]MADLIB/L
DASHLINK.COM takes two arguments. The first is the name of the executable to create and the second is the options file:
$ LOCDIR = F$PARSE(``''P1''',,,''DEVICE'')+F$PARSE(``''P1''',,,''DIRECTORY'') $ LINK/DEB/EXE='P1' - 'LOCDIR''P2'/OPT, - DASH$LIBRARY:DASHLIB/L,CERN_ROOT:[LIB]PACKLIB/L,KERNLIB/L