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)" \
8 HOSTCXX
="${HOST_CXX}" \
10 CONFIG_SHELL
='${SHELL}'
12 ifeq ($(ADK_TARGET_BINFMT_FDPIC
),y
)
13 KERNEL_MAKE_OPTS
+= CC
="$(TARGET_CC) -mno-fdpic"
15 KERNEL_MAKE_OPTS
+= CC
="$(TARGET_CC)"
19 # regex for relocs needs pcre
20 ifeq ($(OS_FOR_BUILD
),Darwin
)
21 KERNEL_MAKE_OPTS
+= HOSTLDFLAGS
='-lpcreposix -Wl,-no_pie'
24 # non-Linux platforms need elf.h
25 ifneq ($(OS_FOR_BUILD
),Linux
)
26 KERNEL_MAKE_OPTS
+= HOSTCFLAGS
='$(HOST_CPPFLAGS) ${HOST_CFLAGS}'
27 KERNEL_MAKE_OPTS
+= HOST_EXTRACFLAGS
='-I${LINUX_DIR}/tools/include -I${LINUX_DIR}/usr/include -I${LINUX_DIR}/security/selinux/include -I${ADK_TOPDIR}/adk/include -DKBUILD_NO_NLS'
29 KERNEL_MAKE_OPTS
+= HOSTCFLAGS
='${HOST_CFLAGS}'
32 ifeq ($(ADK_TARGET_SYSTEM_BANANA_PRO
)$(ADK_TARGET_SYSTEM_ORANGE_PI0
),y
)
33 KERNEL_MAKE_OPTS
+= LOADADDR
=0x40008000
36 KERNEL_MAKE_ENV
:= PATH
="${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:$$PATH"
37 LINUX_BUILD_DIR
:= $(BUILD_DIR
)/$(ADK_TARGET_OS
)-$(ADK_TARGET_ARCH
)