fix formatting
[openadk.git] / mk / kernel-vars.mk
blobdc176d2916e06a20b24624b802efc10a39f8a22d
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 HOSTCC="${HOST_CC}" \
8 HOSTCXX="${HOST_CXX}" \
9 SHELL='${SHELL}' \
10 CONFIG_SHELL='${SHELL}'
12 ifeq ($(ADK_TARGET_BINFMT_FDPIC),y)
13 KERNEL_MAKE_OPTS+= CC="$(TARGET_CC) -mno-fdpic"
14 else
15 KERNEL_MAKE_OPTS+= CC="$(TARGET_CC)"
16 endif
19 # regex for relocs needs pcre
20 ifeq ($(OS_FOR_BUILD),Darwin)
21 KERNEL_MAKE_OPTS+= HOSTLDFLAGS='-lpcreposix -Wl,-no_pie'
22 endif
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'
28 else
29 KERNEL_MAKE_OPTS+= HOSTCFLAGS='${HOST_CFLAGS}'
30 endif
32 ifeq ($(ADK_TARGET_SYSTEM_BANANA_PRO)$(ADK_TARGET_SYSTEM_ORANGE_PI0),y)
33 KERNEL_MAKE_OPTS+= LOADADDR=0x40008000
34 endif
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)