CXX = g++
CXXFLAGS = -std=c++11
RM = rm
SOURCES = $(wildcard src/*.cpp)
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
EXE = r0
%.cpp.o: src/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS)
r0: CXXFLAGS += -Wall -O2
r0: compilation
dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Og -g
dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion
dev: compilation
compilation: $(OBJETS)
$(CXX) -o $(EXE) $(OBJETS)
all:
r0
clean:
$(RM) $(OBJETS) $(EXE)