Makefile Opérationnel + dérangement des fichiers
This commit is contained in:
parent
8cc9818ced
commit
284f9bea71
@ -1,26 +1,29 @@
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -ansi -pedantic -lgraph
|
CFLAGS = -ansi -pedantic -lgraph
|
||||||
OBJS = main.o serpent.o time.o terrain.o pastille.o
|
OBJS = main.o serpent.o time.o terrain.o Oeuf.o
|
||||||
|
|
||||||
|
|
||||||
serpent: $(OBJS)
|
snake: $(OBJS)
|
||||||
$(CC) -o serpent $(OBJS) $(CFLAGS)
|
$(CC) -o snake $(OBJS) $(CFLAGS)
|
||||||
|
|
||||||
main.o: serpent.h time.h pastille.h main.h
|
main.o: serpent.h time.h Oeuf.h main.h menu.h
|
||||||
$(CC) -c main.c $(CFLAGS)
|
$(CC) -c main.c $(CFLAGS)
|
||||||
|
|
||||||
serpent.o: serpent.h
|
serpent.o: serpent.h
|
||||||
$(CC) -c serpent.c $(CFLAGS)
|
$(CC) -c serpent.c $(CFLAGS)
|
||||||
|
|
||||||
timer.o: timer.h serpent.h main.h
|
menu.o: main.h time.h
|
||||||
$(CC) -c timer.c $(CFLAGS)
|
$(CC) -c menu.c $(CFLAGS)
|
||||||
|
|
||||||
pastille.o: pastille.h serpent.h
|
time.o: time.h serpent.h main.h
|
||||||
$(CC) -c pastille.c $(CFLAGS)
|
$(CC) -c time.c $(CFLAGS)
|
||||||
|
|
||||||
terrain.o: terrain.h serpent.h time.h main.h pastille.h
|
Oeuf.o: Oeuf.h time.h
|
||||||
|
$(CC) -c Oeuf.c $(CFLAGS)
|
||||||
|
|
||||||
|
terrain.o: terrain.h serpent.h time.h main.h Oeuf.h
|
||||||
$(CC) -c terrain.c $(CFLAGS)
|
$(CC) -c terrain.c $(CFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.0 serpent
|
rm -f *.o snake
|
@ -1,7 +1,7 @@
|
|||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../fichier.h/Oeuf.h"
|
#include "Oeuf.h"
|
||||||
#include "../fichier.h/time.h"
|
#include "time.h"
|
||||||
|
|
||||||
void InitialiserOeufs(int oeufx[], int oeufy[], int segment) {
|
void InitialiserOeufs(int oeufx[], int oeufy[], int segment) {
|
||||||
int p;
|
int p;
|
@ -1,12 +1,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#include "../fichier.h/serpent.h"
|
#include "serpent.h"
|
||||||
#include "../fichier.h/Oeuf.h"
|
#include "Oeuf.h"
|
||||||
#include "../fichier.h/time.h"
|
#include "time.h"
|
||||||
#include "../fichier.h/main.h"
|
#include "main.h"
|
||||||
#include "../fichier.h/menu.h"
|
#include "menu.h"
|
||||||
|
|
||||||
#define CYCLE 100000L
|
#define CYCLE 100000L
|
||||||
|
|
||||||
int lancer_jeu(){
|
int lancer_jeu(){
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MAIN_H
|
#ifndef MAIN_H
|
||||||
#define MAIN_H
|
#define MAIN_H
|
||||||
|
|
||||||
int jeu(void);
|
int lancer_jeu(void);
|
||||||
int main(void);
|
int main(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,8 +1,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "../fichier.h/main.h"
|
#include "main.h"
|
||||||
#include "../fichier.h/time.h"
|
#include "time.h"
|
||||||
void Menu_debut(void) {
|
void Menu_debut(void) {
|
||||||
int af = ChargerSprite("../img/image.jpg");
|
int af = ChargerSprite("../img/image.jpg");
|
||||||
AfficherSprite(af, 0, 0);
|
AfficherSprite(af, 0, 0);
|
@ -1,5 +1,5 @@
|
|||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#include "../fichier.h/serpent.h"
|
#include "serpent.h"
|
||||||
|
|
||||||
void Update_Serpent(int pos_x[], int pos_y[], int segment, int old_x[], int old_y[], int* direction){
|
void Update_Serpent(int pos_x[], int pos_y[], int segment, int old_x[], int old_y[], int* direction){
|
||||||
int i = 0;
|
int i = 0;
|
@ -1,10 +1,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#include "../fichier.h/time.h"
|
#include "time.h"
|
||||||
#include "../fichier.h/terrain.h"
|
#include "terrain.h"
|
||||||
#include "../fichier.h/serpent.h"
|
#include "serpent.h"
|
||||||
#include "../fichier.h/main.h"
|
#include "main.h"
|
||||||
#include "../fichier.h/Oeuf.h"
|
#include "Oeuf.h"
|
||||||
|
|
||||||
void DessinerScene(int murx[], int mury[], int minute, int seconde, char timer []){
|
void DessinerScene(int murx[], int mury[], int minute, int seconde, char timer []){
|
||||||
int mur;
|
int mur;
|
@ -1,9 +1,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#include "../fichier.h/time.h"
|
#include "time.h"
|
||||||
#include "../fichier.h/main.h"
|
#include "main.h"
|
||||||
#include "../fichier.h/serpent.h"
|
#include "serpent.h"
|
||||||
#define CYCLE 100000L
|
#define CYCLE 100000L
|
||||||
|
|
||||||
void Score(int segment){
|
void Score(int segment){
|
Loading…
x
Reference in New Issue
Block a user