#-------------------------------------------------------------------------- # This makefile is used to compile the simple PVM sample on the SP2. # It can also be used as a template makefile for C or Fortran programs. #-------------------------------------------------------------------------- # # FC and CC specify the compilers to be used for Fortran and C. # FFLAGS or CFLAGS can be set to -g if debugging is desired; the # current -O setting allows compiler optimization. ARCH = RS6K PVM_ROOT = /usr/local/apps/pvm3 PVMLIB = $(PVM_ROOT)/lib/$(ARCH)/libpvm3.a PVMFLIB = $(PVM_ROOT)/lib/$(ARCH)/libfpvm3.a PVMGLIB = $(PVM_ROOT)/lib/$(ARCH)/libgpvm3.a FC = f77 FFLAGS= -O CC = cc CFLAGS= -O CLOCK=realtime.o XPVMC=xpvmconnect.o # EXEDIR sets the directory where executables are put. # Typically, executables are kept in the PVM default binary directory # $(HOME)/pvm3/bin/RS6K, or in current working directory. # If you choose not to move executables to the default location, # you must let PVM know where the executable reside through the 'ep=' # extension in the hostfile. # See example and PVM documentation for details. EXEDIR=$(HOME)/pvm3/bin/RS6K EXEDIR=. # LFLAGS gives paths to include for proper linking: LFLAGS=-bI:/usr/lpp/xlf/lib/lowsys.exp # FLIBS and CLIBS may give particular libraries required. # (in this case, the pvm3 library and the Fortran pvm3 library) FLIBS=$(PVMFLIB) $(PVMGLIB) $(PVMLIB) /usr/lib/libxlf90.a CLIBS=$(PVMGLIB) $(PVMLIB) # INCL gives required include paths. INCL=-I$(PVM_ROOT)/include #-------------------------------------------------------------------------- # This part is typically user-defined, giving the program names, etc. #-------------------------------------------------------------------------- all: setup # setupold uses a more naive matrix transposition routine, found in transpold.f setupold: setup.o transpold.o $(XPVMC) $(CLOCK) $(CC) $(LFLAGS) $(CFLAGS) -o $(EXEDIR)/setup setup.o transpold.o $(XPVMC) $(CLOCK) $(FLIBS) setup: setup.o transp.o $(XPVMC) $(CLOCK) $(CC) $(LFLAGS) $(CFLAGS) -o $(EXEDIR)/setup setup.o transp.o $(XPVMC) $(CLOCK) $(FLIBS) .f.o: $(FC) -c $(FFLAGS) $(INCL) $*.f .c.o: $(CC) -c $(CFLAGS) $(INCL) $*.c clean : rm -f core $(EXEDIR)/setup*.*.out \ $(EXEDIR)/setup*.*.err new : rm -f core *.o $(EXEDIR)/setup $(EXEDIR)/setupold *.results *.*.out \ *.*.err $(EXEDIR)/hostfile *.cmd.tmp fpvm3.h pvmlog* xpvm.trace*