CC = gcc APPNAME = withcppvm -include $(PVM_ROOT)/conf/$(PVM_ARCH).def # general compiler flags CFLAGS_ALL = # general libraries LIBS_SPECIFIC = -lstdc++ #special compiler flags: CFLAGS_SUN = # only used for 'make depend' # usually not necessary DCC = gcc # file suffix (c for C, cc/cpp/cxx for C++ files) SUFFIX = cpp SUFFIX_C = c # c file suffix C_SUFFIX = c # header files INC_DIR = $(PVM_ROOT)/cppvm/h ########################### # includes # ########################### # includes (remind INC_DIR !) INC_ALL = -I$(PVM_ROOT)/include\ -I../h\ -I$(INC_DIR) ############################### # includes hardware dependent # ############################### INC_SUN4SOL2 = ############## # Libararies # ############## LIBS_ALL = -L$(PVM_ROOT)/cppvm/lib/$(PVM_ARCH) -lcppvm \ -L$(PVM_ROOT)/lib/$(PVM_ARCH) -lpvm3 -lgpvm3 -lpvmtrc\ $(LIBS_SPECIFIC) ################################ # libraries hardware dependent # ################################ MACHINE = $(PVM_ARCH) ########################### # assign machine options # ########################### SRC = $(SRC_ALL) $(SRC_$(MACHINE)) CFLAGS = $(CFLAGS_ALL) $(CFLAGS_$(MACHINE)) DFLAGS = $(DFLAGS_ALL) $(DFLAGS_$(MACHINE)) INC = $(INC_ALL) $(INC_$(MACHINE)) LIBS = $(LIBS_ALL) $(ARCHLIB) $(LIBS_$(MACHINE)) DEPENDENCIES = depends ########################### # create names # ########################### # create source and object file names SRC_SUF = $(SRC:%=%.$(SUFFIX)) SOURCES = $(SRC_SUF:%.$(SUFFIX)=$(SRC_DIR)/%.$(SUFFIX)) OBJECTS = $(SRC_SUF:%.$(SUFFIX)=$(OBJ_DIR)/$(PVM_ARCH)/%.o) all: @echo 'Compiling captain and sailor' @$(CC) -c $(CFLAGS) $(INC) mainC.$(SUFFIX) @$(CC) -c $(CFLAGS) $(INC) mainS.$(SUFFIX) @echo 'Linking captain and sailor' @$(CC) -o captain $(CFLAGS) mainC.o $(LIBS) @$(CC) -o sailor $(CFLAGS) mainS.o $(LIBS) @echo 'installing it into ~/pvm3/bin/LINUX/' @mv captain ~/pvm3/bin/LINUX/$(APPNAME)_cpt @mv sailor ~/pvm3/bin/LINUX/$(APPNAME)_slr @echo 'Ready' ########################### # make clean # ########################### # delete object and executable files clean: @echo "Remove object files and executable program" @rm -f *.o @rm -f captain sailor @echo "Ready"