58 lines
811 B
Makefile
58 lines
811 B
Makefile
# CHAPITRE 1 : BUT FINAL
|
|
|
|
but : jeu
|
|
|
|
# CHAPITRE 2 : VARIABLES
|
|
|
|
OFILES = main.o \
|
|
menu.o \
|
|
board.o \
|
|
player.o \
|
|
graphics.o \
|
|
ia.o \
|
|
game_logic.o
|
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -Wall -ansi -pedantic -g -lgraph
|
|
|
|
# CHAPITRE 3 : DEPENDANCES (REGLES IMPLICITES)
|
|
|
|
|
|
|
|
main.o: main.c menu.h game_logic.h graphics.h board.h player.h
|
|
|
|
menu.o: menu.c menu.h graphics.h
|
|
|
|
board.o: board.c board.h player.h game_logic.h
|
|
|
|
player.o: player.c player.h board.h
|
|
|
|
graphics.o: graphics.c graphics.h
|
|
|
|
ia.o: ia.c ia.h game_logic.h board.h
|
|
|
|
game_logic.o: game_logic.c game_logic.h board.h player.h
|
|
|
|
|
|
|
|
|
|
#CHAPITRE 4 : DEPENDANCES AVEC COMMANDES
|
|
|
|
|
|
jeu : $(OFILES)
|
|
$(CC) $(CFLAGS) -o jeu $(OFILES)
|
|
|
|
#CHAPITRE 5 : NETTOYAGE DES FICHIERS GENERES
|
|
|
|
clear :
|
|
-rm -f $(OFILES) jeu
|
|
|
|
#CHAPITRE 6 : BUTS FACTICES
|
|
|
|
.PHONY : jeu clear
|
|
|
|
|
|
run :
|
|
./jeu
|