diff options
Diffstat (limited to 'mk/vars.mk')
-rw-r--r-- | mk/vars.mk | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index 8f3022634..171fbc74e 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -10,38 +10,50 @@ MAKEFLAGS= $(EXTRA_MAKEFLAGS) BUILD_USER= $(shell id -un) BUILD_GROUP= $(shell id -gn) -BASE_DIR:= $(TOPDIR) -DISTDIR?= ${BASE_DIR}/dl -BUILD_DIR:= ${BASE_DIR}/build_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} +# PFX dirs for cleandir +FW_DIR_PFX:= $(BASE_DIR)/firmware BUILD_DIR_PFX:= $(BASE_DIR)/build_* -STAGING_PKG_DIR:= ${BASE_DIR}/pkg_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_PKG_DIR_PFX:= ${BASE_DIR}/pkg_* -STAGING_HOST_DIR:= ${BASE_DIR}/host_${GNU_HOST_NAME} +STAGING_TARGET_DIR_PFX:=${BASE_DIR}/target_* +TOOLCHAIN_BUILD_DIR_PFX=$(BASE_DIR)/toolchain_build_* STAGING_HOST_DIR_PFX:= ${BASE_DIR}/host_* +TARGET_DIR_PFX:= $(BASE_DIR)/root_* + +# some global dirs +BASE_DIR:= $(TOPDIR) +DISTDIR?= ${BASE_DIR}/dl +TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build +SCRIPT_DIR:= $(BASE_DIR)/scripts +STAGING_HOST_DIR:= ${BASE_DIR}/host_${GNU_HOST_NAME} + ifeq ($(ADK_TARGET_ABI),) +TARGET_DIR:= $(BASE_DIR)/root_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} +FW_DIR:= $(BASE_DIR)/firmware/${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} +BUILD_DIR:= ${BASE_DIR}/build_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_TARGET_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC} +STAGING_PKG_DIR:= ${BASE_DIR}/pkg_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_HOST2TARGET:= ../target_${CPU_ARCH}_${ADK_TARGET_LIBC} TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH}_${ADK_TARGET_LIBC} else +TARGET_DIR:= $(BASE_DIR)/root_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} +FW_DIR:= $(BASE_DIR)/firmware/${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} +BUILD_DIR:= ${BASE_DIR}/build_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} STAGING_TARGET_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} STAGING_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} +STAGING_PKG_DIR:= ${BASE_DIR}/pkg_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} STAGING_HOST2TARGET:= ../target_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} endif -SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts -STAGING_TARGET_DIR_PFX:=${BASE_DIR}/target_* -TOOLCHAIN_BUILD_DIR_PFX=$(BASE_DIR)/toolchain_build_* -TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build -SCRIPT_DIR:= $(BASE_DIR)/scripts -FW_DIR:= $(BASE_DIR)/firmware/${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} -FW_DIR_PFX:= $(BASE_DIR)/firmware + PACKAGE_DIR:= $(FW_DIR)/packages -TARGET_DIR:= $(BASE_DIR)/root_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_LIBC} -TARGET_DIR_PFX:= $(BASE_DIR)/root_* +SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts + +# PATH variables TARGET_PATH= ${SCRIPT_DIR}:${STAGING_TARGET_DIR}/scripts:${STAGING_HOST_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH} HOST_PATH= ${SCRIPT_DIR}:${STAGING_HOST_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH} AUTOTOOL_PATH= ${STAGING_HOST_DIR}/bin:${STAGING_HOST_DIR}/usr/bin:${STAGING_TARGET_DIR}/scripts:${_PATH} + ifeq ($(ADK_TARGET_ABI_X32),y) GNU_TARGET_NAME= $(CPU_ARCH)-x32-linux else |