You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1017 B
Makefile

# Par défaut, on construit le fichier shell, la doc, et le fichier tuto.pdf
all: shell doc tuto.pdf
# Pour construire le fichier shell, on a besoin du fichier shell.c
shell: shell.c
# La ligne de commande suivante compile le fichier shell.c en shell
gcc -Wall -pedantic --extra-warnings -std=c99 -o $@ $^
# Pour construire la doc, on a besoin du fichier shell.c
doc: shell.c
# La ligne de commande suivante génère la doc à partir de shell.c
doxygen Doxyfile
# Pour construire tuto.pdf, on a besoin du fichier tuto.tex
tuto.pdf: tuto.tex
# On crée un répertoire pour les fichiers temporaires
mkdir -p .build-latex
# On compile le fichier .tex en utilisant ce répertoire temporaire
pdflatex -output-directory .build-latex $^
# On crée dans le répertoire courant un lien vers le fichier .pdf généré
ln -f .build-latex/$@
# Pour nettoyer les fichiers temporaires
clean:
rm -fr .build-latex
# Pour nettoyer tous les fichiers générés
cleanall: clean
rm -f shell
rm -rf doc/
rm -f tuto.pdf