-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (32 loc) · 856 Bytes
/
Makefile
File metadata and controls
51 lines (32 loc) · 856 Bytes
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
#desactivation of the implicite rules
.SUFFIXES:
.PHONY: nonreg
#Definitions
EXECUTABLE = ECOGEN
CXX = mpicxx
CXXFLAGS = -std=c++11 -Wall -Wextra -Wpedantic $(MYCXXFLAGS)
release: CXXFLAGS += -O3
debug: CXXFLAGS += -O0 -g
coverage: CXXFLAGS += -O3 -fprofile-arcs -ftest-coverage
profile: CXXFLAGS += -O3 -pg
SOURCES = $(shell find ./src -type f -name "*.cpp")
OBJETS = $(SOURCES:.cpp=.o)
GCOV_OBJ = $(SOURCES:.cpp=.gcno) $(SOURCES:.cpp=.gcda)
all: release # Default is release build
all debug release coverage profile: exec
exec: $(OBJETS)
$(CXX) $^ -o $(EXECUTABLE) $(CXXFLAGS)
%o: %cpp
$(CXX) -c $< -o $@ $(CXXFLAGS)
###
depend:
makedepend $(SOURCES)
clean:
rm -rf $(OBJETS) $(GCOV_OBJ)
cleanres:
rm -rf ./results/*
#Use command: time make nonreg
nonreg:
@./nonreg/nonreg.sh || true
cleannonreg:
rm -rf ./nonreg/reports/*