-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
64 lines (47 loc) · 2.2 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# change to CC for Cray systems
CXX = mpicxx
OPTFLAGS = -g -O3 -fopenmp -DPRINT_DIST_STATS -DDONT_CREATE_DIAG_FILES #-DDEBUG_PRINTF -DCHECK_COLORING_CONFLICTS
# use export ASAN_OPTIONS=verbosity=1 to check ASAN output
SNTFLAGS = -std=c++11 -fopenmp -fsanitize=address -O1 -fno-omit-frame-pointer
CXXFLAGS = -std=c++11 $(OPTFLAGS) -DABS_MOD_PER_ITER #-DUSE_MPI_COLLECTIVES #-DUSE_32_BIT_GRAPH #-DDEBUG_PRINTF
ENABLE_HPCLINK=0
ifeq ($(ENABLE_HPCLINK),1)
HPCLINKER = /projects/Tools/hpctoolkit/pkgs-theta/hpctoolkit-2018-08-09/bin/hpclink
# Static LLVM OpenMP
OMPT= -Wl,-rpath=/projects/Tools/hpctoolkit/pkgs-theta/llvm-openmp/lib -L/projects/Tools/hpctoolkit/pkgs-theta/llvm-openmp/lib -lomp
LDFLAGS = $(OMPT) -lm
endif
ENABLE_NETWORKIT=0
ifeq ($(ENABLE_NETWORKIT),1)
NETWORKIT_DIR = $(HOME)/builds/networkit
CXXFLAGS += -std=c++14 -I$(NETWORKIT_DIR)/include
NOBJFILES = generators/nkit-er.o generators/nkit-crg.o generators/nkit-ba.o generators/nkit-hg.o generators/gen-io.o
NTARGET = $(BIN)/graphGenerator
LDFLAGS = -L$(NETWORKIT_DIR)/lib -Wl,-rpath=$(NETWORKIT_DIR)/lib -lnetworkit -L$(NETWORKIT_DIR)/lib64 -Wl,-rpath=$(NETWORKIT_DIR)/lib -ltlx
endif
GOBJFILES = main.o rebuild.o distgraph.o louvain.o coloring.o compare.o
FOBJFILES = converters/convert.o converters/matrix-market.o converters/dimacs.o converters/metis.o converters/simple2.o converters/simple.o converters/snap.o converters/shards.o utils.o
POBJFILES = parallel-converters/parallel-converter.o parallel-converters/parallel-shards.o utils.o
ALLOBJFILES = $(GOBJFILES) $(FOBJFILES) $(NOBJFILES) $(POBJFILES)
BIN = bin
GTARGET = $(BIN)/graphClustering
FTARGET = $(BIN)/fileConvert
PTARGET = $(BIN)/parallelFileConvert
ALLTARGETS = $(GTARGET) $(FTARGET) $(NTARGET) $(PTARGET)
all: bindir $(ALLTARGETS)
bindir: $(BIN)
$(BIN):
mkdir -p $(BIN)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $^
$(GTARGET): $(GOBJFILES)
$(CXX) $^ $(OPTFLAGS) -o $@ -lstdc++
$(FTARGET): $(FOBJFILES)
$(CXX) $^ $(OPTFLAGS) -o $@ $(LDFLAGS)
$(NTARGET): utils.o $(NOBJFILES)
$(CXX) $^ $(OPTFLAGS) -o $@ $(LDFLAGS)
$(PTARGET): $(POBJFILES)
$(CXX) $^ $(OPTFLAGS) -o $@ $(LDFLAGS)
.PHONY: bindir clean
clean:
rm -rf *~ $(ALLOBJFILES) $(ALLTARGETS) $(BIN) dat.out.* check.out.*