#Makefile pour la construction du programme testMots

CC=cc -g -Wall -c

# quand on tape "make" sans paramètre 
tout: testCaracteres #testMots

# Compilation des programmes principaux

testMots: testMots.o MachineCaracteres.o MachineMots.o
	cc -o testMots testMots.o MachineCaracteres.o MachineMots.o

testCaracteres: testCaracteres.o MachineCaracteres.o
	cc -o testCaracteres testCaracteres.o MachineCaracteres.o

# Compilation des modules 

MachineCaracteres.o: MachineCaracteres.c MachineCaracteres.h
	$(CC) MachineCaracteres.c
	
MachineMots.o: MachineMots.c MachineMots.h MachineCaracteres.h 
	$(CC) MachineMots.c
	
testMots.o: testMots.c MachineMots.h MachineCaracteres.h
	$(CC) testMots.c
	
testCaracteres.o: testCaracteres.c MachineCaracteres.h
	$(CC) testCaracteres.c
	
# pour faire le ménage 
clean:
	rm -f *~ *.o testCaracteres testMots

