Makefile 515 Bytes
Newer Older
Pietro Incardona's avatar
Pietro Incardona committed
1 2 3 4 5 6 7 8 9 10
include ../../../example.mk

CC=mpic++

LDIR =

OBJ_EIGEN = main_eigen.o
OBJ_PETSC = main_petsc.o

%.o: %.cpp
11
	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
Pietro Incardona's avatar
Pietro Incardona committed
12 13 14 15

all: stokes_3d_eigen stokes_3d_petsc

stokes_3d_eigen: $(OBJ_EIGEN)
16
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
Pietro Incardona's avatar
Pietro Incardona committed
17 18

stokes_3d_petsc: $(OBJ_PETSC)
19
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
Pietro Incardona's avatar
Pietro Incardona committed
20

21
run: all
incardon's avatar
incardon committed
22
	mpirun -np 3 ./stokes_3d_eigen && mpirun -np 3 ./stokes_3d_petsc
23 24
	
.PHONY: clean all run
Pietro Incardona's avatar
Pietro Incardona committed
25 26 27 28

clean:
	rm -f *.o *~ core stokes_3d_eigen stokes_3d_petsc