-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·37 lines (28 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
executable file
·37 lines (28 loc) · 1.01 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
#!/usr/bin/make
# Makefile
# (c) Mohammad Hasanzadeh Mofrad, 2019
# (e) m.hasanzadeh.mofrad@gmail.com
# make TIMING=-DTIMING to enable time counters
# TIMING = -DTIMING
CXX = g++
MPI_CXX = mpicxx
SKIPPED_CXX_WARNINGS = -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-maybe-uninitialized
CXX_FLAGS = -std=c++14 -fpermissive $(SKIPPED_CXX_WARNINGS)
OPTIMIZE = -DNDEBUG -O3 -flto -fwhole-program -march=native
#DEBUG = -g -fsanitize=undefined,address -lasan -lubsan
.PHONY: dir all test misc clean
objs = deg pr cc bfs
objs_w = sssp
all: dir $(objs) $(objs_w)
dir:
@mkdir -p bin
$(objs): %: src/apps/%.cpp
$(MPI_CXX) $(CXX_FLAGS) $(OPTIMIZE) $(DEBUG) $(TIMING) -o bin/$@ -I src $<
$(objs_w): %: src/apps/%.cpp
$(MPI_CXX) $(CXX_FLAGS) $(OPTIMIZE) $(DEBUG) $(TIMING) -DHAS_WEIGHT -o bin/$@ -I src $<
test: dir
$(CXX) $(CXX_FLAGS) $(OPTIMIZE) -o bin/main src/singlenode/main.cpp
misc: dir
$(CXX) $(CXX_FLAGS) $(OPTIMIZE) -o bin/converter src/misc/converter.cpp
clean:
rm -rf bin