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

37 lines
750 B
Makefile
Raw Normal View History

CXX = g++
CXXFLAGS = -std=c++11
RM = rm
2023-02-16 20:35:32 +01:00
2023-03-19 20:32:32 +01:00
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
2023-03-10 13:40:06 +01:00
2023-03-19 20:32:32 +01:00
tgz:
$(MAKE) clean 2> /dev/null
$(TAR) "$(NAME).tar.gz" $(RAPPORT) *
2023-03-10 13:40:06 +01:00
clean:
2023-03-19 20:32:32 +01:00
-$(RM) $(OBJETS) $(EXE)
-$(RM) *.tar.gz