This repository has been archived on 2023-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
iaj/TP1/C-Cpp/Makefile

28 lines
505 B
Makefile
Raw Permalink Normal View History

2023-01-27 17:24:27 +01:00
CXX = g++
CXXFLAGS = -std=c++11
RM = rm
SOURCES = $(wildcard src/*.cpp)
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
2023-01-27 17:26:13 +01:00
EXE = r0
2023-01-27 17:24:27 +01:00
%.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)