CC = gcc
CFLAGS = -Wall -W -g -ansi -pedantic

all : main

main : main.o structures.o io.o constantes.o othellier.o parties.o ia.o
	$(CC) -o $@ $^ -lm

main.o : main.c structures.h io.h constantes.h othellier.h parties.h ia.h
	$(CC) -o $@ -c $<

structures.o : structures.c structures.h
	$(CC) -o $@ -c $<
	
constantes.o : constantes.c constantes.h
	$(CC) -o $@ -c $<
	
io.o : io.c io.h
	$(CC) -o $@ -c $<

othellier.o : othellier.c othellier.h
	$(CC) -o $@ -c $<

parties.o : parties.c parties.h
	$(CC) -o $@ -c $<

ia.o : ia.c ia.h
	$(CC) -o $@ -c $<
		
clean :
	rm -rf *.o
	
mrproper : clean
	rm -rf main
