# # $Id: Makefile.aimk,v 1.16 1998/11/20 19:46:41 pvmsrc Exp $ # # Makefile.aimk for PVM example programs. # # aimk also creates a $PVM_ARCH directory below this one and will cd # to it before invoking make - this allows building in parallel on # different architectures. # SHELL = /bin/sh PVMDIR = $(HOME)/pvm3 SDIR = $(PWD)/../ BDIR = $(HOME)/pvm3/bin XDIR = $(BDIR)/$(PVM_ARCH) CC = gcc CFLOPTS = -g -gstabs+ -Wall # Use the following options to turn the C optimizer on #CFLOPTS = -O -Wall CFLAGS = $(CFLOPTS) -I$(PVM_ROOT)/include $(ARCHCFLAGS) ##### Need to select some architecture-specific libraries to link tasks # The default setup is for workstations ### Select PVMLIB depending on architecture. # For MPPs (PGON and AIX4SP2/SP2MPI) select: # PVMLIB = -lpvm3pe # For Workstations and shared memory architectures select: # PVMLIB = -lpvm3 PVMLIB = -lpvm3 ### Select the PVMHLIB depending on architecture # Host versions of programs use sockets to communicate with the daemon. # They can be built with aimk hostprogs, they are only necessary for # MPPs and are OPTIONAL for other architectures # # For MPPs and Workstations select # PVMHLIB = -lpvm3 # for Shared Memory Archtiectures # PVMHLIB = -lpvm3s PVMHLIB = -lpvm3 ######################################################################## LIBS = $(PVMLIB) $(ARCHLIB) HLIBS = $(PVMHLIB) $(ARCHLIB) GLIBS = -lgpvm3 LFLAGS = $(LOPT) -L$(PVM_ROOT)/lib/$(PVM_ARCH) CPROGS = psum$(EXESFX) spsum$(EXESFX) spmd_sum$(EXESFX) default: psum$(EXESFX) spsum$(EXESFX) spmd_sum$(EXESFX) all: c-all c-all: $(CPROGS) hostprogs: $(HOSTCRPROGS) $(HOSTFPROGS) clean: /bin/rm -f *.o $(CPROGS) $(XDIR): - mkdir $(BDIR) - mkdir $(XDIR) psum$(EXESFX): $(SDIR)/parallel_sum.c $(XDIR) $(CC) $(CFLAGS) -o $@ $(SDIR)/parallel_sum.c $(LFLAGS) $(LIBS) mv $@ $(XDIR) spsum$(EXESFX): $(SDIR)/slave_parallel_sum.c $(XDIR) $(CC) $(CFLAGS) -o $@ $(SDIR)/slave_parallel_sum.c $(LFLAGS) $(LIBS) mv $@ $(XDIR) spmd_sum$(EXESFX): $(SDIR)/spmd_sum.c $(XDIR) $(CC) $(CFLAGS) -o $@ $(SDIR)/spmd_sum.c $(LFLAGS) $(LIBS) mv $@ $(XDIR)