blob: 3ed8067e97199d1af900d40efaf73aa62d37f5a2 (
plain)
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
|
IDIR=include
DEFINES=-DDETERMINISTIC
CFLAGS=-g -Wall -Wextra -Wpedantic -std=c99 -D_DEFAULT_SOURCE $(DEFINES) -I$(IDIR)
LIBS=
SRCS=include/tak.c include/xorshift64.c include/negamax.c include/weights.c include/cnn1986.c include/lcdlib.c include/cnn1986_cache.c
OBJS=$(SRCS:.c=.o)
BUILDROOT_DIR=buildroot-2020.11.1
ifeq ($(PLATFORM), native)
SIZE=size
STRIP=strip
else
STRIP=$(BUILDROOT_DIR)/output/host/bin/arm-linux-strip
SIZE=$(BUILDROOT_DIR)/output/host/bin/arm-linux-size
CC=$(BUILDROOT_DIR)/output/host/bin/arm-linux-cc
endif
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)
ctaklm: src/ctaklm.o $(OBJS)
$(CC) $(CFLAGS) src/ctaklm.o $(OBJS) -o ctaklm
# $(STRIP) ctaklm
$(SIZE) ctaklm
pptdb: src/pptdb.o $(OBJS)
$(CC) $(CFLAGS) src/pptdb.o $(OBJS) -o pptdb
ct1986: src/ct1986.o $(OBJS)
$(CC) $(CFLAGS) src/ct1986.o $(OBJS) -o ct1986
$(STRIP) ct1986
$(SIZE) ct1986
all: ctaklm ct1986
ifneq ($(PLATFORM), native)
$(info Building the pi image)
./do_buildroot.sh $(BUILDROOT_DIR)
endif
clean:
rm -f ctaklm ct1986 pptdb
rm -f src/*.o include/*.o
|