aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-03-10 11:12:32 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-03-10 11:12:32 +0000
commit9f91b508aad19770280173540541994312c9b7a8 (patch)
treeefac4e7a585231ccca4d9f037b6360cba26c96d2
parentd4f95e0a34cb13a74f796d51cf2445f50ecaf719 (diff)
downloadupstream-9f91b508aad19770280173540541994312c9b7a8.tar.gz
upstream-9f91b508aad19770280173540541994312c9b7a8.tar.bz2
upstream-9f91b508aad19770280173540541994312c9b7a8.zip
build: add a variable for the name of the {build,staging}_dir/{target,toolchain}-* directories
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39857 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--rules.mk20
1 files changed, 10 insertions, 10 deletions
diff --git a/rules.mk b/rules.mk
index 47ba928de5..5d63227339 100644
--- a/rules.mk
+++ b/rules.mk
@@ -87,11 +87,8 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux
DIR_SUFFIX:=_$(LIBC)-$(LIBCV)$(if $(CONFIG_arm),_eabi)
BIN_DIR:=$(BIN_DIR)$(if $(CONFIG_USE_UCLIBC),,-$(LIBC))
- BUILD_DIR:=$(BUILD_DIR_BASE)/target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
- STAGING_DIR:=$(TOPDIR)/staging_dir/target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
- BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
- TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
- PACKAGE_DIR:=$(BIN_DIR)/packages
+ TARGET_DIR_NAME = target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
+ TOOLCHAIN_DIR_NAME = toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
else
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
GNU_TARGET_NAME=$(call qstrip,$(CONFIG_TARGET_NAME))
@@ -99,12 +96,15 @@ else
GNU_TARGET_NAME=$(shell gcc -dumpmachine)
endif
REAL_GNU_TARGET_NAME=$(GNU_TARGET_NAME)
- BUILD_DIR:=$(BUILD_DIR_BASE)/target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
- STAGING_DIR:=$(TOPDIR)/staging_dir/target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
- BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/toolchain-$(GNU_TARGET_NAME)
- TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/toolchain-$(GNU_TARGET_NAME)
- PACKAGE_DIR:=$(BIN_DIR)/packages
+ TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
+ TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
endif
+
+PACKAGE_DIR:=$(BIN_DIR)/packages
+BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME)
+STAGING_DIR:=$(TOPDIR)/staging_dir/$(TARGET_DIR_NAME)
+BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/$(TOOLCHAIN_DIR_NAME)
+TOOLCHAIN_DIR:=$(TOPDIR)/staging_dir/$(TOOLCHAIN_DIR_NAME)
STAMP_DIR:=$(BUILD_DIR)/stamp
STAMP_DIR_HOST=$(BUILD_DIR_HOST)/stamp
TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(BUILD_DIR))