kernel-vars.mk 1.0 KB

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