CC = gcc CFLAGS = -Wall -Iinclude/ OUTPUT = main MAIN = main.c DEPS = include/types.h include/board.h include/print.h include/piece.h OBJ = lib/board.o lib/print.o lib/piece.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) all: $(OBJ) $(CC) $(CFLAGS) -o $(OUTPUT) $^ $(MAIN) clean: rm -f $(OUTPUT) $(OBJ)