46 lines
635 B
Makefile
46 lines
635 B
Makefile
|
### VARIABLES ###
|
||
|
|
||
|
CC = gcc
|
||
|
CFLAGS = -ansi \
|
||
|
-pedantic
|
||
|
EXE = repetition_dans_tableaux
|
||
|
OFILES = main.o \
|
||
|
repetition.o
|
||
|
|
||
|
### BUT PAR DEFAUT ###
|
||
|
|
||
|
but : ${EXE}
|
||
|
|
||
|
### REGLES ESSENTIELLES ###
|
||
|
|
||
|
programme : repetition.o main.o
|
||
|
$(CC) $(CFLAGS) -o programme repetition.o main.o
|
||
|
|
||
|
repetition.o : repetition.c repetition.h
|
||
|
$(CC) $(CFLAGS) -c repetition.c
|
||
|
|
||
|
main.o : main.c repetition.h
|
||
|
$(CC) $(CFLAGS) -c main.c
|
||
|
|
||
|
|
||
|
|
||
|
${EXE} : ${OFILES}
|
||
|
$(CC) $(CFLAGS) -o ${EXE} ${OFILES}
|
||
|
|
||
|
### REGLES OPTIONNELLES ###
|
||
|
|
||
|
clean :
|
||
|
-rm -f ${OFILES}
|
||
|
|
||
|
mrproper : clean but
|
||
|
|
||
|
### BUTS FACTICES ###
|
||
|
|
||
|
.PHONY : but clean mrproper
|
||
|
|
||
|
### FIN ###
|
||
|
|
||
|
|
||
|
|
||
|
|