Créer un profil "debug" qui contient les warnings et le flag "-g", make sans argument compile avec l'optimisation 3
This commit is contained in:
parent
c438d38a5d
commit
aa0292e796
1 changed files with 8 additions and 3 deletions
11
Makefile
11
Makefile
|
@ -1,6 +1,5 @@
|
|||
CXX = g++
|
||||
CXXFLAGS = -Wall -Wextra -O3 --std=c++17
|
||||
DEVFLAGS = -g
|
||||
CXXFLAGS = --std=c++17
|
||||
RM = rm
|
||||
|
||||
SOURCES = $(wildcard src/*.cpp)
|
||||
|
@ -11,7 +10,13 @@ EXE = ecosysteme
|
|||
%.cpp.o: src/%.cpp
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS)
|
||||
|
||||
main: $(OBJETS)
|
||||
main: CXXFLAGS += -O3
|
||||
main: compilation
|
||||
|
||||
debug: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g
|
||||
debug: compilation
|
||||
|
||||
compilation: $(OBJETS)
|
||||
$(CXX) -o $(EXE) $(OBJETS)
|
||||
|
||||
all:
|
||||
|
|
Reference in a new issue