forked from douglasjacobsen/MPI-SCVT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CC = mpic++
BDIR = /opt/local/boost_1_48_0-gcc
NCDFDIR = /opt/local/netcdf-4.1.3-gcc
LIBS = -I${BDIR}/include/ -L${BDIR}/lib/ -lboost_mpi -lboost_serialization
ifeq ($(NETCDF),yes)
NCDFDIR = /opt/local/netcdf-4.1.3-gcc
LIBS += -I$(NCDFDIR)/include/ -L$(NCDFDIR)/lib/ -lnetcdf -lnetcdf_c++
NCDF_FLAGS = -DUSE_NETCDF
endif
FLAGS = -O3 -m64 $(NCDF_FLAGS)
DFLAGS = -g -m64 -D_DEBUG
EXE=MpiScvt.x
TRISRC=Triangle/
PLATFORM=_MACOS
PLATFORM=_LINUX
ifeq ($(PLATFORM),_LINUX)
FLAGS = -O3 -m64 -DLINUX $(NCDF_FLAGS)
DFLAGS = -g -m64 -D_DEBUG -DLINUX
endif
ifeq ($(PLATFORM),_MACOS)
FLAGS = -O3 -m64 $(NCDF_FLAGS)
DFLAGS = -g -m64 -D_DEBUG
endif
TRILIBDEFS= -DTRILIBRARY
all: trilibrary
${CC} scvt-mpi.cpp ${TRISRC}triangle.o ${LIBS} ${FLAGS} -o ${EXE}
debug: trilibrary-debug
${CC} scvt-mpi.cpp ${TRISRC}triangle.o ${LIBS} ${DFLAGS} -o ${EXE}
trilibrary:
$(CC) $(CSWITCHES) $(TRILIBDEFS) ${FLAGS} -c -o ${TRISRC}triangle.o ${TRISRC}triangle.c
trilibrary-debug:
$(CC) $(CSWITCHES) $(TRILIBDEFS) ${DFLAGS} -c -o ${TRISRC}triangle.o ${TRISRC}triangle.c
clean:
rm -f *.dat ${EXE} ${TRISRC}triangle.o