# Makefile for the SMP graph 3-coloring algorithm. # pfh 9/99, writing from scratch so that I can understand # the SIMPLE stuff. # Requires gmake for the compilation rule! EXECS = graph_color SOURCE = graph_color.c graph_color.h OBJS = graph_color.o SIMPLE_DIR = $(HOME)/SIMPLE/simple-3.2C MPI_INC_DIRS = -I$(HOME)/MPI/include -I$(HOME)/MPI/mpich/include MPI_LIB_DIR = $(HOME)/MPI/mpich/build/alpha/ch_p4/lib COMPILER = cc LINKER = cc LIBS = -lsimple -lm -lpthread -lmpich LIBDIRS = -L$(MPI_LIB_DIR) -L$(SIMPLE_DIR)/lib INCDIRS = -I$(SIMPLE_DIR)/include $(MPI_INC_DIRS) # Pick one of these two FAST_OPT = -tune ev56 -fast -unroll 0 -DAXP DDT_OPT = -O0 OPT = $(INCDIRS) -g3 -newc -pthread $(FAST_OPT) LINKOPTS = -g -pthread $(LIBDIRS) $(OBJS) $(LIBS) -o $(EXECS) # Compilation rule %.o:%.c $(COMPILER) $(OPT) $(INCDIRS) -c $< # Target list all: $(EXECS) # Link rule $(EXECS): $(OBJS) $(LINKER) $(LINKOPTS) # Clean up the mess rule clean: rm $(EXECS) $(OBJS) core