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

70 lines
1.7 KiB
Makefile

CC=gcc
CFLAGS=-std=c99 -Werror -Wall -Wextra -pedantic -Wshadow -Wno-missing-field-initializers -Wstrict-overflow
LDFLAGS=-std=c99 -Werror -Wall -Wextra -Wpedantic -Wshadow -Wno-missing-field-initializers -Wstrict-overflow -lm -lcurl -ljansson
GFLAGS=-lcsfml-graphics -lcsfml-window -lcsfml-system
DEPFLAGS=-MMD -MF
OUTPUT=bin/Release/GINPA
OBJ=obj/Release
DEP=Dep
ifdef DEBUG
CFLAGS+=-g
LDFLAGS+=-g
OUTPUT=bin/Debug/GINPA
OBJ=obj/Debug
ARG=DEBUG=1 #Pour compiler en mode debug récursivement
endif
.SILENT:
#La dépendance de OUTPUT à recursive permet de s'assurer qu'une modification d'un
# fichier dans un sous-dossier sera prise en compte lors d'un nouveau make
$(OUTPUT): recursive $(OBJ)/main.o
$(CC) -o $@ $(OBJ)/*.o $(LDFLAGS) $(GFLAGS)
recursive:
make $(ARG) -C Vue
make $(ARG) -C Controleur
make $(ARG) -C Modele
$(OBJ)/main.o: main.c
$(CC) -c -o $@ $< $(CFLAGS) $(GFLAGS) $(DEPFLAGS) $(DEP)/$(basename $<).d
-include $(DEP)/*.d
.PHONY: debug clean mrproper doc doc-config clean-doc
debug:
make DEBUG=1
doc:
make doc-config
doxygen Doxyfile
doc-config:
doxygen -g
sed -i 's/PROJECT_NAME.*=.*"My Project"/PROJECT_NAME = "GINPA"/' Doxyfile
sed -i 's/RECURSIVE.*=.*NO/RECURSIVE = YES/' Doxyfile
sed -i 's/EXTRACT_ALL.*=.*NO/EXTRACT_ALL = YES/' Doxyfile
clean-doc:
rm -f Doxyfile
rm -f Doxyfile.bak
rm -f doxygen_sqlite3.db
rm -rf html
rm -rf latex
#Supprime tous les fichiers objets et fichiers dépendance
clean:
find obj -name '*.o' -delete
rm -rf Dep/*.d
rm -rf Modele/Dep/*.d
rm -rf Controleur/Dep/*.d
rm -rf Vue/Dep/*.d
rm -f logs.txt
#Supprime tous les fichiers binaires, objets et dépendances
mrproper: clean
rm -rf bin/Debug/GINPA
rm -rf bin/Release/GINPA