26 lines
462 B
Makefile
26 lines
462 B
Makefile
CXX = g++
|
|
CXXFLAGS = --std=c++17
|
|
RM = rm
|
|
|
|
SOURCES = $(wildcard src/*.cpp)
|
|
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
|
|
|
|
EXE = ecosysteme
|
|
|
|
%.cpp.o: src/%.cpp
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS)
|
|
|
|
main: CXXFLAGS += -O3
|
|
main: compilation
|
|
|
|
debug: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g
|
|
debug: compilation
|
|
|
|
compilation: $(OBJETS)
|
|
$(CXX) -o $(EXE) $(OBJETS)
|
|
|
|
all:
|
|
main
|
|
|
|
clean:
|
|
$(RM) $(OBJETS) $(EXE)
|