CXX = g++ CXXFLAGS = -Wall -Wextra -O3 --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) main: $(OBJETS) $(CXX) -o $(EXE) $(OBJETS) all: main clean: $(RM) $(OBJETS) $(EXE)