2024-02-01 15:16:54 +01:00
|
|
|
CXX = g++
|
|
|
|
RM = rm
|
2023-09-19 11:39:57 +02:00
|
|
|
|
2024-02-01 15:16:54 +01:00
|
|
|
SOURCES = $(wildcard src/*.cpp)
|
|
|
|
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
|
2023-09-19 11:39:57 +02:00
|
|
|
|
2023-11-25 21:18:30 +01:00
|
|
|
CXXFLAGS = --std=c++11
|
|
|
|
|
2024-02-01 15:16:54 +01:00
|
|
|
EXE = example
|
|
|
|
EXE_EXT = out
|
2023-09-19 11:39:57 +02:00
|
|
|
|
|
|
|
%.cpp.o: src/%.cpp
|
2023-11-12 16:23:10 +01:00
|
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
2023-09-19 11:39:57 +02:00
|
|
|
|
|
|
|
main: CXXFLAGS += -O3
|
|
|
|
main: compilation
|
|
|
|
|
2023-10-19 20:53:57 +02:00
|
|
|
dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g
|
|
|
|
dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion
|
2023-09-19 11:39:57 +02:00
|
|
|
dev: compilation
|
|
|
|
|
|
|
|
compilation: $(OBJETS)
|
2023-10-10 13:15:09 +02:00
|
|
|
$(CXX) -o $(EXE).$(EXE_EXT) $(OBJETS)
|
2023-09-19 11:39:57 +02:00
|
|
|
|
|
|
|
all:
|
|
|
|
main
|
|
|
|
|
|
|
|
clean:
|
2023-10-10 13:15:09 +02:00
|
|
|
$(RM) $(OBJETS) $(EXE).$(EXE_EXT)
|