#
# BEWARE: this Makefile was automatically generated by Adaptor
#         Adaptor will not overwrite any changes you make here,
#         however this Makefile may become out of date
# Target machine is SGI     (PVM)   (Host-Node)
#
# PHOME is Home Directory of Adaptor 
# DALIB is directory of its implementation for this machine
#
PHOME =  $(HOME)/adaptor1.1
DALIB  = $(PHOME)/dalib/PVM3.1
#
# Standard commands
ADAPTOR = $(PHOME)/bin/fadapt
FSPLIT  = fsplit
FSTRIP  = $(PHOME)/bin/fstrip
#
FC  = f77
NFC = f77
FSPLIT = fsplit
CC  = cc
#
# Compiler Options
OPT  = -O -w
NOPT = -O -w
#
ARCH = SGI
PVM  = $(HOME)/pvm3
#
XLIB  = $(DALIB)/libadpx.a -lX11
NLIB  = $(DALIB)/dalib.a
HLIB  = $(DALIB)/hostlib.a
LIB1  = $(DALIB)/unilib.a
#
# main programs of host, node, cube
#
MAIN_HOST  = $(DALIB)/mhost.o
MAIN_NODE  = $(DALIB)/mnode.o
MAIN_CUBE  = $(DALIB)/mcube.o
MAIN_NODE1 = $(DALIB)/mnode1.o
#
PVMLIB = $(PVM)/lib/$(ARCH)/libpvm3.a
#
# Object Codes
#
NODE_OBJ = node.o
NSRC = node.f
#
HOST_OBJ = host.o
HSRC = host.f
#
CUBE_OBJ = cube.o
#
OBJ1 = node1.o
#
all: host node
	mv node $(PVM)/bin/$(ARCH)
#
host: $(HOST_OBJ) $(MAIN_HOST) $(NLIB) $(PVMLIB)
	${FC} -o host $(MAIN_HOST) $(HOST_OBJ) $(NLIB) $(PVMLIB)
#
node: $(NODE_OBJ) $(MAIN_NODE) $(NLIB) $(PVMLIB)
	${FC} -o node $(MAIN_NODE) $(NODE_OBJ) $(NLIB) $(PVMLIB)
#
cube: $(CUBE_OBJ) $(MAIN_CUBE) $(NLIB) $(PVMLIB)
	${FC} -o cube $(MAIN_CUBE) $(CUBE_OBJ) $(NLIB) $(PVMLIB)
#
node1: $(MAIN_NODE1) $(OBJ1) $(LIB1)
	${FC} -o node1 $(MAIN_NODE1) $(OBJ1) $(LIB1)
#
# So that we don't get the default rules
#
.SUFFIXES:
.SUFFIXES: .f .o .strip
# Fortran compilation rule
.f.o:
	$(NFC) $(NOPT) -c $<
#
# Width stripping rule
.f.strip:
	$(FSTRIP) $< ; touch $@
#
#
# Compilation rules: host sources, node sources
#
host.o: host.strip host.f
	$(FC) $(OPT) -c host.f
#
node.o: node.strip node.f
	$(NFC) $(NOPT) -c node.f
#
cube.o: cube.strip cube.f
	$(NFC) $(NOPT) -c cube.f
#
node1.o: node1.strip node1.f
	$(NFC) $(NOPT) -c node1.f
#
# Target to perform adaption
#
adapt: frc
	$(ADAPTOR) -sgipvm -H prime.f 
#
frc:
#
clean:
	-rm -f *.o node host node1 cube core $(NSRC) $(HSRC) zzz*.f
#
