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

CC=mpic++

LDIR =

OBJ_DORD = main_data_ord.o
OBJ_CORD = main_comp_ord.o
Pietro Incardona's avatar
Pietro Incardona committed
9
OPT =
Pietro Incardona's avatar
Pietro Incardona committed
10 11

all: md_data_ord md_comp_ord
Pietro Incardona's avatar
Pietro Incardona committed
12 13
all_test: OPT += -DTEST_RUN
all_test: md_data_ord_test md_comp_ord_test
Pietro Incardona's avatar
Pietro Incardona committed
14 15

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

md_data_ord: $(OBJ_DORD)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

md_comp_ord: $(OBJ_CORD)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

Pietro Incardona's avatar
Pietro Incardona committed
24 25 26 27 28 29 30 31 32 33
md_data_ord_test: $(OBJ_DORD)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

md_comp_ord_test: $(OBJ_CORD)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)

run: all_test
	source $$HOME/openfpm_vars; mpirun -np 4 ./md_data_ord_test; mpirun -np 4 ./md_comp_ord_test

.PHONY: clean all run all_test on_test
Pietro Incardona's avatar
Pietro Incardona committed
34 35 36 37

clean:
	rm -f *.o *~ core md_data_ord md_comp_ord