makefile opérationnel (images ne marchent pas)
This commit is contained in:
parent
11d4d230d0
commit
aad090d260
34
Makefile
34
Makefile
@ -1,37 +1,37 @@
|
||||
Snake : main.o jeu.o grille.o menu.o obstacle.o pomme.o serpent.o timer.o
|
||||
gcc -ansi -pedantic -lgraph -o Snake ../src/main.c ../src/jeu.c ../src/grille.c ../src/menu.c ../src/obstacle.c ../src/pomme.c ../src/serpent.c ../src/timer.c
|
||||
gcc -lgraph -o Snake main.o jeu.o grille.o menu.o obstacle.o pomme.o serpent.o timer.o
|
||||
|
||||
main.o : ../src/main.c ../include/menu.h ../include/jeu.h
|
||||
main.o : ./src/main.c ./include/main.h ./include/menu.h ./include/jeu.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/main.c
|
||||
gcc -ansi -pedantic -c ./src/main.c
|
||||
|
||||
jeu.o : ../src/jeu.c ../include/grille.h ../include/serpent.h ../include/pomme.h ../include/jeu.h ../include/menu.h ../include/timer.h ../include/obstacle.h
|
||||
jeu.o : ./src/jeu.c ./include/grille.h ./include/serpent.h ./include/pomme.h ./include/jeu.h ./include/menu.h ./include/timer.h ./include/obstacle.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/jeu.c
|
||||
gcc -ansi -pedantic -c ./src/jeu.c
|
||||
|
||||
grille.o : ../src/grille.c ../include/grille.h
|
||||
grille.o : ./src/grille.c ./include/grille.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/grille.c
|
||||
gcc -ansi -pedantic -c ./src/grille.c
|
||||
|
||||
menu.o : ../src/menu.c ../include/menu.h ../include/main.h
|
||||
menu.o : ./src/menu.c ./include/menu.h ./include/main.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/menu.c
|
||||
gcc -ansi -pedantic -c ./src/menu.c
|
||||
|
||||
obstacle.o : ../src/obstacle.c ../include/grille.h ../include/serpent.h ../include/obstacle.h ../include/pomme.h
|
||||
obstacle.o : ./src/obstacle.c ./include/grille.h ./include/serpent.h ./include/obstacle.h ./include/pomme.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/obstacle.c
|
||||
gcc -ansi -pedantic -c ./src/obstacle.c
|
||||
|
||||
pomme.o : ../src/pomme.c ../include/grille.h ../include/serpent.h
|
||||
pomme.o : ./src/pomme.c ./include/grille.h ./include/serpent.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/pomme.c
|
||||
gcc -ansi -pedantic -c ./src/pomme.c
|
||||
|
||||
serpent.o : ../src/serpent.c ../include/serpent.h ../include/main.h ../include/timer.h
|
||||
serpent.o : ./src/serpent.c ./include/serpent.h ./include/main.h ./include/timer.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/serpent.c
|
||||
gcc -ansi -pedantic -c ./src/serpent.c
|
||||
|
||||
timer.o : ../src/timer.c ../include/timer.h
|
||||
timer.o : ./src/timer.c ./include/timer.h
|
||||
|
||||
gcc -ansi -pedantic -lgraph ../src/timer.c
|
||||
gcc -ansi -pedantic -c ./src/timer.c
|
||||
|
||||
clean :
|
||||
-rm -f main.o jeu.o grille.o menu.o obstacle.o pomme.o serpent.o timer.o
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <graph.h>
|
||||
#include "../include/main.h"
|
||||
#include "../include/jeu.h"
|
||||
#include "../include/menu.h"
|
||||
|
||||
|
@ -10,8 +10,8 @@ typedef struct {
|
||||
|
||||
Pomme creerPomme() {
|
||||
Pomme pomme;
|
||||
pomme.x = rand() % 60;
|
||||
pomme.y = rand() % 40;
|
||||
pomme.x = rand() % 59;
|
||||
pomme.y = rand() % 39;
|
||||
return pomme;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user