forked from bernardoct/WaterPaths
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·59 lines (45 loc) · 1.48 KB
/
Makefile
File metadata and controls
executable file
·59 lines (45 loc) · 1.48 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
CFLAGS=-std=c++14 #-fsanitize=address -fno-omit-frame-pointer #-fno-sanitize-address-use-after-scope
LDFLAGS=-lstdc++
# List of sources and objects (include all .cpp files)
SOURCES=$(shell find ./src -name "*.cpp")
OBJECTS=$(SOURCES:.cpp=.o)
TARGET=triangleSimulation
EXECUTABLE=$(TARGET)
LIB_DIR=./lib
LIBS=-static-libasan -lm
all: $(SOURCES) $(TARGET)
borg: CC=mpicxx
#borg: CC=g++ # for serial borg debugging
borg: LIBS += -lborgms
#borg: LIBS += -lborg # for serial borg debugging
borg: CFLAGS += -DPARALLEL -fopenmp -march=native -O2
borg: all
gcc: CC=g++
gcc: CFLAGS+=-O2 -march=native -fopenmp
gcc: all
intel: CC=icc
intel: CFLAGS+=-O2 ${TACC_VEC_FLAGS} -qopenmp
intel: all
gcc-debug: CC=g++
gcc-debug: CFLAGS+=-Og -march=native -g -fopenmp
gcc-debug: all
intel-debug: CC=icc
intel-debug: CFLAGS+=-O1 -xAVX -g -qopenmp
#intel-debug: CFLAGS+=-O3 ${TACC_VEC_FLAGS} -g -qopenmp
intel-debug: all
pchecking: CC=icc
pchecking: CFLAGS+=-O0 ${TACC_VEC_FLAGS} -g -traceback -check-pointers=rw -check-pointers-undimensioned -check-pointers-dangling=all -rdynamic -qopenmp
pchecking: all
prof: CFLAGS += -fopenmp -pg
prof: all
# How to make objects and executables
.cpp.o:
$(CC) -c $(CFLAGS) $^ -o $@
$(TARGET): $(OBJECTS)
$(CC) -I. $(LDFLAGS) $(OBJECTS) $(CFLAGS) -o $@ -L$(LIB_DIR) $(LIBS) $(DEFINES)
clean:
rm -rf $(shell find . -name "*.o") $(EXECUTABLE)
rm -rf $(shell find . -name "*.optrpt") $(EXECUTABLE)
clean-aux:
rm -rf $(shell find . -name "*~")
rm -rf $(shell find . -name "*.*swp")