Makefile 372 Bytes
Newer Older
incardon's avatar
incardon committed
1 2 3 4 5
include ../../example.mk

CC=mpic++

LDIR =
6
OPT=
incardon's avatar
incardon committed
7 8 9

OBJ = main.o

incardon's avatar
incardon committed
10 11
all: sph_dlb

12 13 14
sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test: sph_dlb

incardon's avatar
incardon committed
15
%.o: %.cpp
16
	$(CC) -O3 $(OPT) -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
incardon's avatar
incardon committed
17 18 19 20 21

sph_dlb: $(OBJ)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)


22
run: sph_dlb_test
incardon's avatar
incardon committed
23 24 25 26 27 28 29
	mpirun -np 2 ./sph_dlb

.PHONY: clean all run

clean:
	rm -f *.o *~ core sph_dlb