This repository has been archived on 2023-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
GestionProjet/Makefile

49 lines
947 B
Makefile
Raw Permalink Normal View History

2023-10-19 23:05:11 +02:00
CXX = g++
CXXFLAGS = --std=c++11
RM = rm
TAR = tar -cf
2023-10-27 19:03:15 +02:00
SOURCES = $(wildcard src/*.cpp)
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
2023-10-19 23:05:11 +02:00
2023-10-27 19:03:15 +02:00
EXE = tp5
EXE_EXT = out
PDF_LOCATION = report
PDF_FILE = explications.pdf
2023-10-19 23:05:11 +02:00
2023-10-28 11:22:50 +02:00
ARCHIVE = $(EXE).tar
2023-10-19 23:05:11 +02:00
%.cpp.o: src/%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS)
main: CXXFLAGS += -O3
main: compilation
dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g
dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion
dev: compilation
compilation: $(OBJETS)
$(CXX) -o $(EXE).$(EXE_EXT) $(OBJETS)
all:
main
2023-10-27 19:03:15 +02:00
pdf-make:
cd report && \
$(MAKE)
pdf-clean:
cd report && \
$(MAKE) clean
clean: pdf-clean
2023-10-28 12:02:41 +02:00
-$(RM) $(OBJETS) "$(EXE).$(EXE_EXT)" "$(ARCHIVE)"
2023-10-19 23:05:11 +02:00
2023-10-27 19:03:15 +02:00
archive: pdf-make
2023-10-28 11:22:50 +02:00
cp "$(PDF_LOCATION)/$(PDF_FILE)" .
$(TAR) "$(ARCHIVE)" $(SOURCES) $(wildcard includes/*.hpp) Makefile \
2023-10-29 17:17:31 +01:00
binome.txt "$(PDF_FILE)" diagramme_uml.png
2023-10-28 11:22:50 +02:00
$(RM) "$(PDF_FILE)"