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/TP2/Makefile
2023-03-19 20:32:32 +01:00

36 lines
750 B
Makefile

CXX = g++
CXXFLAGS = -std=c++11
RM = rm
NAME = TP2 - Groupe 4
TAR = tar --exclude="README.*" --exclude="Rapport" -czf
RAPPORT = Rapport/rapport.tex
SOURCES = $(wildcard src/*.cpp)
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
EXE = rand_player
%.cpp.o: src/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS)
rand_player: CXXFLAGS += -Wall -O2
rand_player: 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:
rand_player
tgz:
$(MAKE) clean 2> /dev/null
$(TAR) "$(NAME).tar.gz" $(RAPPORT) *
clean:
-$(RM) $(OBJETS) $(EXE)
-$(RM) *.tar.gz