opkg: update to 0.3.5
[openadk.git] / mk / kernel-vars.mk
blob72fc56693c21249cec00157b9ed9dc0e90a2c50e
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 KERNEL_MAKE_OPTS:= V=1 \
5 ARCH="$(ADK_TARGET_KARCH)" \
6 CROSS_COMPILE="$(TARGET_CROSS)" \
7 CC="$(TARGET_CC)" \
8 HOSTCC="${HOST_CC}" \
9 HOSTCXX="${HOST_CXX}" \
10 SHELL='${SHELL}' \
11 CONFIG_SHELL='${SHELL}'
13 # regex for relocs needs pcre
14 ifeq ($(OS_FOR_BUILD),Darwin)
15 KERNEL_MAKE_OPTS+= HOSTLDFLAGS='-lpcreposix -Wl,-no_pie'
16 endif
18 # non-Linux platforms need elf.h
19 ifneq ($(OS_FOR_BUILD),Linux)
20 KERNEL_MAKE_OPTS+= HOSTCFLAGS='$(HOST_CPPFLAGS) ${HOST_CFLAGS}'
21 KERNEL_MAKE_OPTS+= HOST_EXTRACFLAGS='-I${LINUX_DIR}/tools/include -I${LINUX_DIR}/security/selinux/include -I${ADK_TOPDIR}/adk/include -DKBUILD_NO_NLS'
22 else
23 KERNEL_MAKE_OPTS+= HOSTCFLAGS='${HOST_CFLAGS}'
24 endif
26 ifeq ($(ADK_TARGET_SYSTEM_BANANA_PRO)$(ADK_TARGET_SYSTEM_ORANGE_PI0),y)
27 KERNEL_MAKE_OPTS+= LOADADDR=0x40008000
28 endif
30 KERNEL_MAKE_ENV:= PATH="${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:$$PATH"
31 LINUX_BUILD_DIR:= $(BUILD_DIR)/linux-$(ADK_TARGET_ARCH)