#-------------------------------------------------------------------------- # This makefile is used to compile MPL examples 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 = mpxlf FFLAGS= -g CC = mpcc CFLAGS = -g # EXEDIR sets the directory where executables are put. # Some people put all PVM executables in a bin directory, but # here they are just kept in the current working directory. EXEDIR=. # LFLAGS may give paths to include for proper linking. # (none required for MPL programs) # FLIBS and CLIBS may give particular libraries required. # (none required for these programs) # INCL gives required include paths. # (none required in this case) #-------------------------------------------------------------------------- # This part is typically user-defined, giving the program names, etc. #-------------------------------------------------------------------------- all: mplmanager mplworker mplmanager: mplmanager.o $(FC) $(LFLAGS) $(FFLAGS) mplmanager.o $(FLIBS) \ -o $(EXEDIR)/mplmanager mplworker: mplworker.o $(FC) $(LFLAGS) $(FFLAGS) mplworker.o $(FLIBS) \ -o $(EXEDIR)/mplworker .f.o: $(FC) -c $(FFLAGS) $(INCL) $*.f .c.o: $(CC) -c $(CFLAGS) $(INCL) $*.c clean : rm -f core mpl *.o mpl*.*.out mpl*.*.err new : rm -f core *.o mplmanager mplworker \ mpl*.results mpl*.*.out mpl*.*.err *.cmd *.cmd.tmp