IDIR=include DEFINES=-DDETERMINISTIC CFLAGS=-O3 -Wall -Wextra -Wpedantic -std=c99 -D_DEFAULT_SOURCE $(DEFINES) -I$(IDIR) LIBS= SRCS=include/tak.c include/negamax_cnn1986.c include/weights.c include/lcdlib.c include/cnn1986_treap_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