summaryrefslogtreecommitdiff
path: root/Makefile
blob: b51d597dfd033b7cbc7a2c3fdb02447e8261b453 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CC     = gcc
CFLAGS = -Wall -Iinclude/
OUTPUT = main
MAIN   = main.c
DEPS   = include/types.h include/board.h include/print.h include/piece.h	\
         include/coordinate.h include/move.h include/input.h include/game.h	\
         include/square.h
OBJ    = lib/board.o lib/print.o lib/piece.o lib/coordinate.o lib/move.o	\
         lib/input.o lib/game.o lib/square.o

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

all: $(OBJ)
	$(CC) $(CFLAGS) -o $(OUTPUT)  $^ $(MAIN)

clean:
	rm -f $(OUTPUT) $(OBJ)
nihil fit ex nihilo