#-------------------------------------------------------------------------- # This makefile is used to compile the simple PVMe 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. FC = xlf FFLAGS= -O CC = xlc CFLAGS= -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=-L/usr/lpp/ssp/css/libtb2 -lcss # FLIBS and CLIBS may give particular libraries required. # (in this case, the pvm3 library and the Fortran pvm3 library # and proper include path for linking PVMe programs) FLIBS=-lpvm3 -lfpvm3 CLIBS=-lpvm3 INCLUDE=-bI:/usr/lib/pvm3e.exp # INCL gives required include paths. # INCL= #-------------------------------------------------------------------------- # This part is typically user-defined, giving the program names, etc. #-------------------------------------------------------------------------- all: include manager worker # # Special consideration is given for the fact that xlf compiles do not # search the include path for include files. So, the proper include file # is linked into the source directory. The fortran files are also touched # to guarantee they are compiled with the proper header. # include: touch *.f ln -s -f /usr/lpp/pvm3/lib/fpvm3.h . manager: manager.o $(FC) $(LFLAGS) $(FFLAGS) manager.o $(FLIBS) -o $(EXEDIR)/manager \ $(INCLUDE) worker: worker.o $(FC) $(LFLAGS) $(FFLAGS) worker.o $(FLIBS) -o $(EXEDIR)/worker \ $(INCLUDE) .f.o: $(FC) -c $(FFLAGS) $(INCL) $*.f .c.o: $(CC) -c $(CFLAGS) $(INCL) $*.c clean : rm -f core $(EXEDIR)/manager.results $(EXEDIR)/manager*.*.out \ $(EXEDIR)/manager*.*.err $(EXEDIR)/pvmnodelist pvmnodelist new : rm -f core *.o $(EXEDIR)/manager $(EXEDIR)/worker $(EXEDIR)/*.results \ $(EXEDIR)/*.*.out $(EXEDIR)/*.*.err $(EXEDIR)/pvmnodelist pvmnodelist\ $(EXEDIR)/*.cmd $(EXECDIR)/*.cmd.tmp fpvm3.h