organisation du code + makefile
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
but:Snake
|
||||
CC=gcc
|
||||
CFLAGS=-ansi -pedantic -lgraph
|
||||
|
||||
OFILES=main.o\
|
||||
serpent.o\
|
||||
terrain.o\
|
||||
pomme.o\
|
||||
timer.o\
|
||||
fonction.o
|
||||
all:serpent
|
||||
|
||||
CC= gcc
|
||||
CFLAGS= -ansi -pedantic -g -lgraph
|
||||
serpent:main.o scene.o serpent.o timer.o score.o
|
||||
$(CC) $(CFLAGS) -o serpent main.o scene.o serpent.o timer.o score.o
|
||||
|
||||
fonction.o:fonction.h
|
||||
main.o:main.c
|
||||
serpent.o:serpent.c
|
||||
terrain.o:terrain.c
|
||||
pomme.o:pomme.c
|
||||
timer.o:timer.c
|
||||
main.o:main.c fonction.h
|
||||
$(CC) -c main.c $(CFLAGS)
|
||||
|
||||
Snake:$(OFILES)
|
||||
$(CC) $(CFLAGS)Snake $(OFILES)
|
||||
scene.o:scene.c fonction.h
|
||||
$(CC) -c scene.c $(CFLAGS)
|
||||
|
||||
clean:-rm -f $(OFLIES)Snake
|
||||
serpent.o: serpent.c fonction.h
|
||||
$(CC) -c serpent.c $(CFLAGS)
|
||||
|
||||
.PHONY:but clean
|
||||
timer.o:timer.c fonction.h
|
||||
$(CC) -c timer.c $(CFLAGS)
|
||||
|
||||
score.o:score.c fonction.h
|
||||
$(CC) -c score.c $(CFLAGS)
|
||||
|
||||
clean:-rm -f *.o serpent
|
||||
|
Reference in New Issue
Block a user