#
# Makefile for PVM group library example programs.
#
# Set PVM_ROOT to the path where PVM includes and libraries are installed.
# Set PVM_ARCH to your architecture type (SUN4, HP9K, RS6K, SGI, etc.)
# Set ARCHLIB to any special libs needed on PVM_ARCH (-lrpc, -lsocket, etc.)
# otherwise leave ARCHLIB blank
#
# PVM_ARCH and ARCHLIB are set for you if you use "$PVM_ROOT/lib/aimk"
# instead of "make".
#

#PVM_ROOT	=
#PVM_ARCH	=
#ARCHCFLAGS	=

PVMIDIR	=	$(PVM_ROOT)/include
PVMLDIR	=	$(PVM_ROOT)/lib/$(PVM_ARCH)
PVMLIB	=	-lgpvm3 -lpvm3
CFLAGS	=	-g -I$(PVMIDIR) -L$(PVMLDIR) $(ARCHCFLAGS)
#BDIR	=	$(HOME)/pvm3/bin
BDIR	=	../bin
XDIR	=	$(BDIR)/$(PVM_ARCH)
F77		=	f77
FFLAGS	=	-g
PVMFLIB	=	-lfpvm3 $(PVMLIB)

all: gexamp tst thb tnb ge tjl tjf gs

joinleave: joinleave.o
	$(CC) $(CFLAGS) -o joinleave joinleave.o $(PVMLIB)

tst: tst.o
	$(CC) $(CFLAGS) -o tst tst.o $(PVMLIB)
	cp tst $(XDIR)

gs: gs.o
	$(CC) $(CFLAGS) -o gs gs.o $(PVMLIB)
	cp gs $(XDIR)

ge: ge.o
	$(CC) $(CFLAGS) -o ge ge.o $(PVMLIB)
	cp ge $(XDIR)

gexamp: gexamp.o
	$(CC) $(CFLAGS) -o gexamp gexamp.o $(PVMLIB)
	cp gexamp $(XDIR)

thb: thb.o
	$(CC) $(CFLAGS) -o thb thb.o $(PVMLIB)
	cp thb $(XDIR)

tnb: tnb.o
	$(CC) $(CFLAGS) -o tnb tnb.o $(PVMLIB)
	cp tnb $(XDIR)

tjl: tjl.o
	$(CC) $(CFLAGS) -o tjl tjl.o $(PVMLIB)
	cp tjl $(XDIR)

tjf: tjf.o
	$(CC) $(CFLAGS) -o tjf tjf.o $(PVMLIB)
	cp tjf $(XDIR)

trsg: trsg.o
	$(CC) $(CFLAGS) -o trsg trsg.o $(PVMLIB)
	cp trsg $(XDIR)

frsg: frsg.o
	$(F77) $(FFLAGS) -o frsg frsg.o $(PVMFLIB)
	cp frsg $(XDIR)

clean:
	rm -f *.o tst thb tnb tjl tjf ge gexamp gs joinleave trsg frsg

