Fichier Makefile terminé, avec la création des fichiers d'en-tête
This commit is contained in:
parent
c72c4c4c1e
commit
a7f7142baf
@ -2,7 +2,7 @@
|
||||
|
||||
### BUT FINAL ###
|
||||
|
||||
but : snake
|
||||
but : run
|
||||
|
||||
### VARIABLES ###
|
||||
|
||||
@ -22,11 +22,23 @@ fenetre.o : fenetre.h plateau_init.h
|
||||
|
||||
main.o : main.c fenetre.h
|
||||
|
||||
### COMMANDES ###
|
||||
|
||||
snake : $(OFILES)
|
||||
$(CC) $(CFLAGS) -o snake $(OFLIES)
|
||||
|
||||
clean : -rm -f $(OFLIES) snake
|
||||
run : $(OFILES)
|
||||
$(CC) $(CFLAGS) -o lancement $(OFILES)
|
||||
./lancement
|
||||
|
||||
### NETTOYAGE DES FICHIERS GENERES ###
|
||||
|
||||
clean :
|
||||
-rm -f $(OFILES) lancement *~
|
||||
|
||||
|
||||
|
||||
### BUT FACTISES ###
|
||||
|
||||
.PHONY : but clean
|
||||
|
||||
|
||||
### FIN ###
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <graph.h>
|
||||
#include "plateau_init.c"
|
||||
#include "plateau_init.h"
|
||||
|
||||
|
||||
int main (void) {
|
||||
int start (void) {
|
||||
|
||||
couleur green, grey, yellow, red, black;
|
||||
|
||||
|
11
snake/fenetre.h
Normal file
11
snake/fenetre.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* Fichier d'en-tête comprenant les prototypes et les constantes nommée
|
||||
Written by Yann KERAUDREN and Titouan LERICHE */
|
||||
|
||||
|
||||
#ifndef FENETRE_H
|
||||
#define FENETRE_H
|
||||
|
||||
|
||||
int start (void);
|
||||
|
||||
#endif /* FENETRE_H */
|
@ -6,5 +6,7 @@
|
||||
|
||||
int main(void) {
|
||||
|
||||
start();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
23
snake/plateau_init.h
Normal file
23
snake/plateau_init.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* Fichier d'en-tête comprenant les definitions des contantes nommées et les prototypes)
|
||||
Written by Yann KERAUDREN and Titouan LERICHE*/
|
||||
|
||||
|
||||
|
||||
#ifndef PLATEAU_INIT_H
|
||||
#define PLATEAU_INIT_H
|
||||
|
||||
|
||||
|
||||
#define LIGNES 40
|
||||
#define COLONNES 60
|
||||
#define NBR_POMMME 5
|
||||
#define TAILLE_SERPENT 10
|
||||
|
||||
|
||||
|
||||
int** plateau_init(void);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* PLATEAU_INIT_H */
|
Loading…
x
Reference in New Issue
Block a user