#Nom du programme
NAME = solver

#Le compilateur 
CC = gcc
CFLAGS = -Wall -Wextra 
SDL = $(shell sdl2-config --cflags --libs)

#Les fichiers sources 
SRC = solver.c main.c BitboardEditor.c
OBJ = $(SRC:.c=.o)

#Cible par defaut
all: $(NAME)

#Liason des fichiers objets afin d'obtenir léxecutable
$(NAME): $(OBJ)
	$(CC) -o $(NAME) $(OBJ) $(SDL) -lpthread

#Compilation
%.o: %.c 
	$(CC) $(CFLAGS) -c $< -o $@

#Netooyer les fihciers
clean:
	rm -f *.o 

fclean: clean 
	rm -f $(NAME)

