Commits

Jay Barra committed ce91f39

makefiles for homeworks

Comments (0)

Files changed (1)

+TARGET=mpi
+CC=mpicxx
+HEADERS=
+SOURCES=main.cpp 
+
+MPI_BASE=/home/f/csci/scott/local/mpich2-1.4.1p1_BUILD/src/mpe2
+
+INCLUDEPATH=$(MPI_BASE)/include
+MPI_LIBS=$(MPI_BASE)/lib
+
+LIBS=-lmpich
+
+LDFLAGS= 
+CFLAGS=-c -Wall
+OBJECTS=$(SOURCES:.cpp=.o)
+#----------------------------------------------
+all: $(SOURCES) $(TARGET) 
+
+$(TARGET): $(OBJECTS) 
+	$(CC) -I$(INCLUDEPATH) -L$(MPI_LIBS) $(LIBS) $(LDFLAGS) $(OBJECTS) -o $(TARGET) 
+
+.cpp.o:
+	$(CC) $(CFLAGS) $< -o $@
+
+clean:
+	rm -rf *.core *.o $(TARGET)
+
+