00001 CFLAGS = -Wall
00002
00003 # il faut mettre le nom de votre fichier principal (sans le ".c" ici)
00004 NOM = hyvernat-solution
00005
00006 NOMLAB = $(NOM)-labyrinthes
00007
00008 all: lab
00009
00010 test: test
00011
00012 lab: test-lab
00013
00014 test: graphes.o $(NOM).o test.o
00015 gcc $(CFLAGS) -o test graphes.o $(NOM).o test.o
00016
00017 test-lab: labyrinthes.h graphes.o labyrinthes.o $(NOMLAB).o test-lab.o
00018 gcc $(CFLAGS) -o test-lab graphes.o labyrinthes.o $(NOMLAB).o test-lab.o
00019
00020 labyrinthes.o: labyrinthes.c labyrinthes.h
00021 gcc $(CFLAGS) -c labyrinthes.c
00022
00023 graphes.o: graphes.c graphes.h
00024 gcc $(CFLAGS) -c graphes.c
00025
00026 $(NOM).o: $(NOM).c
00027 gcc $(CFLAGS) -c $(NOM).c
00028
00029 $(NOMLAB).o: labyrinthes.h $(NOMLAB).c
00030 gcc $(CFLAGS) -c $(NOMLAB).c
00031
00032 test.o: test.c
00033 gcc $(CFLAGS) -c test.c
00034
00035 test-lab.o: labyrinthes.h test-lab.c
00036 gcc $(CFLAGS) -c test-lab.c
00037
00038 clean:
00039 rm -f test test-lab *.o
00040