-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (29 loc) · 772 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Project: Maturitni projekt šachy
# Author: Jakub Urbanek
# Year: 2022
CC = gcc
CFLAGS = -Wall -g -O3
LIBS= -lm
OBJFILES= main.o move_counter.o game.o evaluation.o chess_logic.o chess_structs.o
SRCDIR= src
BINDIR= bin
BINNAME= chess
TESTDIR= test_scenarios
default: build clean
build: makedir $(OBJFILES)
$(CC) $(CFLAGS) $(LIBS) $(OBJFILES) -o $(BINDIR)/$(BINNAME)
%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $< -o $@
makedir:
rm -rf $(BINDIR)
mkdir $(BINDIR)
clean:
rm -f $(OBJFILES)
valgrind_test:
cd bin; \
valgrind ./chess -d < ../$(TESTDIR)/valgrind_test_in.txt
#https://www.chessprogramming.org/Perft_Results
move_counter_test_verbose:
./move_counter_test.sh $(TESTDIR) --verbose
move_counter_test:
./move_counter_test.sh $(TESTDIR)