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

CC=mpic++

LDIR =

OBJ = main.o

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

Pietro Incardona's avatar
Pietro Incardona committed
12
gray_scott: $(OBJ)
Pietro Incardona's avatar
Pietro Incardona committed
13 14
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

Pietro Incardona's avatar
Pietro Incardona committed
15
all: gray_scott
Pietro Incardona's avatar
Pietro Incardona committed
16

Pietro Incardona's avatar
Pietro Incardona committed
17
run: all
incardon's avatar
incardon committed
18
	mpirun -np 4 ./gray_scott
Pietro Incardona's avatar
Pietro Incardona committed
19 20

.PHONY: clean all run
Pietro Incardona's avatar
Pietro Incardona committed
21 22

clean:
Pietro Incardona's avatar
Pietro Incardona committed
23
	rm -f *.o *~ core gray_scott
Pietro Incardona's avatar
Pietro Incardona committed
24