From 947c69afdb6e61816ca8a5e06b64680df871c28c Mon Sep 17 00:00:00 2001 From: abraham Date: Wed, 23 Oct 2024 12:56:25 +0200 Subject: [PATCH] ajout du makefile --- Makefile | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ main.h | 0 2 files changed, 53 insertions(+) create mode 100644 main.h diff --git a/Makefile b/Makefile index e69de29..eca27fc 100644 --- a/Makefile +++ b/Makefile @@ -0,0 +1,53 @@ +# CHAPITRE 1 : BUT FINAL + +but : game + +# CHAPITRE 2 : VARIABLES + +OFILES = affichage.o \ + Bloque_Jdeux.o \ + Bloque_Jun.o \ + grille.o \ + Joueur_deux_pion.o \ + Joueur_un_pion.o \ + main.o + +CC = gcc + +CFLAGS = -Wall -ansi -pedantic -g -lgraph + +# CHAPITRE 3 : DEPENDANCES (REGLES IMPLICITES) + +affichage.o : main.h + +Bloque_Jdeux.o : Bloque_Jun.h grille.h + +Bloque_Jun.o : Bloque_Jdeux.h grille.h + +grille.o : main.h + +Joueur_deux_pion.o : grille.h Bloque_Jun.h Bloque_Jun.h + +Joueur_un_pion.o : grille.h Bloque_Jun.h Bloque_Jdeux.h + +main.o : affichage.h Bloque_Jdeux.h Bloque_Jun.h grille.h Joueur_deux_pion.h Joueur_un_pion.h + + +#CHAPITRE 4 : DEPENDANCES AVEC COMMANDES + + +game : $(OFILES) + $(CC) $(CFLAGS) -o game $(OFILES) + +#CHAPITRE 5 : NETTOYAGE DES FICHIERS GENERES + +clean : + -rm -f $(OFILES) game + +#CHAPITRE 6 : BUTS FACTICES + +.PHONY : but clear + + +run : + ./game diff --git a/main.h b/main.h new file mode 100644 index 0000000..e69de29