summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-20 19:12:06 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-20 19:12:06 +0000
commit36502c5a6f406da55b497bafc9f0136ffcb8e5c7 (patch)
treebba99df497037fa377ea161a3be294d3e24249e7 /rules.mk
parent1981ee7d7515524e5a5485a2b5dc8a4c86691a18 (diff)
downloadopenwrt-36502c5a6f406da55b497bafc9f0136ffcb8e5c7.tar.gz
openwrt-36502c5a6f406da55b497bafc9f0136ffcb8e5c7.tar.bz2
openwrt-36502c5a6f406da55b497bafc9f0136ffcb8e5c7.zip
build: move host build directories of package/* to build_dir/target-*/host/
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48400
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/rules.mk b/rules.mk
index b5be5b2671..16348b1c18 100644
--- a/rules.mk
+++ b/rules.mk
@@ -61,6 +61,8 @@ BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
export SHELL:=/usr/bin/env bash
+IS_PACKAGE_BUILD := $(if $(filter package/%,$(SUBDIR)),1)
+
OPTIMIZE_FOR_CPU=$(subst i386,i486,$(ARCH))
ifeq ($(ARCH),powerpc)
@@ -94,8 +96,6 @@ BIN_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINA
INCLUDE_DIR:=$(TOPDIR)/include
SCRIPT_DIR:=$(TOPDIR)/scripts
BUILD_DIR_BASE:=$(TOPDIR)/build_dir
-BUILD_DIR_HOST:=$(BUILD_DIR_BASE)/host
-STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
LIBC:=$(call qstrip,$(CONFIG_LIBC))
@@ -130,6 +130,9 @@ STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
BUILD_LOG_DIR:=$(TOPDIR)/logs
PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
+BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR)/host,$(BUILD_DIR_BASE)/host)
+STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
+
TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(EXTRA_OPTIMIZATION)
TARGET_CXXFLAGS = $(TARGET_CFLAGS)