-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
71 lines (55 loc) · 1.78 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
65
66
67
68
69
70
71
# VOLT: Vertex Ordering to List Triangles
# Copyright (C) 2022 Fabrice Lécuyer ([email protected])
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 or later.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details: https://www.gnu.org/licenses/
CC=g++ -std=c++14 #-fconcepts
DEBUG?=0 # debug option
ifeq ($(DEBUG), 1)
CFLAGS=-Og -Wextra -g3 -D DEBUG -fopenmp
o=debug.o
else
# -g for debugging
CFLAGS=-Ofast -g -fopenmp # -Wall https://cpluspluspedia.com/fr/tutorial/4708/compiler-et-construire # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
o=o
endif
EXEC=volt
MF=makefile # recompile when Makefile has been modified
UTILS_H = utils/tools.h \
utils/inout.h \
utils/edgelist.h \
utils/adjlist.h \
utils/heap.h \
utils/continuousrank.h
# utils/CLI11.h
ALGOS_H = algo/algo_triangles.h
ORDERS_H = order/order_deg.h \
order/order_rand.h \
order/order_kcore.h \
order/order_triangles.h
UTILS_O = $(UTILS_H:.h=.$(o))
ALGOS_O = $(ALGOS_H:.h=.$(o))
ORDERS_O = $(ORDERS_H:.h=.$(o))
all: $(EXEC)
volt: volt.$(o) $(UTILS_O) $(ALGOS_O) $(ORDERS_O)
$(CC) $^ $(CFLAGS) -o $@
volt.$(o): $(UTILS_H) $(ALGOS_H) $(ORDERS_H)
algo/algo_%.$(o): $(UTILS_H)
order/order_%.$(o): $(UTILS_H)
# utils/CLI11.$(o): utils/CLI11.h
# $(CC) -c $< $(CFLAGS) -o $@
%.debug.o: %.cpp $(MF)
$(CC) -c $< $(CFLAGS) -o $@
%.o: %.cpp $(MF)
@$(CC) -c $< $(CFLAGS) -o $@
.PHONY: clean mrproper
clean:
rm -rf */*.$(o) *.$(o)
mrproper: clean
rm -rf $(EXEC)