diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-20 19:12:13 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-20 19:12:13 +0000 |
commit | 03bc8d94f0d0579cf6de35d719b96f6b3df3345d (patch) | |
tree | 714143b03ea9093bcab76520b61271d2071f63b1 | |
parent | 36502c5a6f406da55b497bafc9f0136ffcb8e5c7 (diff) | |
download | upstream-03bc8d94f0d0579cf6de35d719b96f6b3df3345d.tar.gz upstream-03bc8d94f0d0579cf6de35d719b96f6b3df3345d.tar.bz2 upstream-03bc8d94f0d0579cf6de35d719b96f6b3df3345d.zip |
host-build.mk: change default installation prefix of package/* host builds to staging_dir/target-*/host
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48401
-rw-r--r-- | include/host-build.mk | 22 | ||||
-rw-r--r-- | rules.mk | 4 |
2 files changed, 14 insertions, 12 deletions
diff --git a/include/host-build.mk b/include/host-build.mk index e2b5f2f8d1..456b418f86 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -30,7 +30,8 @@ BUILD_TYPES += host HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))) HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built -HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.$(PKG_NAME)_installed +HOST_BUILD_PREFIX:=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR)/host,$(STAGING_DIR_HOST)) +HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed override MAKEFLAGS= @@ -68,11 +69,11 @@ HOST_CONFIGURE_ARGS = \ --build=$(GNU_HOST_NAME) \ --program-prefix="" \ --program-suffix="" \ - --prefix=$(STAGING_DIR_HOST) \ - --exec-prefix=$(STAGING_DIR_HOST) \ - --sysconfdir=$(STAGING_DIR_HOST)/etc \ - --localstatedir=$(STAGING_DIR_HOST)/var \ - --sbindir=$(STAGING_DIR_HOST)/bin + --prefix=$(HOST_BUILD_PREFIX) \ + --exec-prefix=$(HOST_BUILD_PREFIX) \ + --sysconfdir=$(HOST_BUILD_PREFIX)/etc \ + --localstatedir=$(HOST_BUILD_PREFIX)/var \ + --sbindir=$(HOST_BUILD_PREFIX)/bin HOST_MAKE_FLAGS = @@ -132,11 +133,12 @@ define Download/default endef define Host/Exports/Default - $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*),-I $$(p)) - $(1) : export STAGING_PREFIX=$$(STAGING_DIR_HOST) - $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig - $(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig + $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-*)),-I $$(p)) + $(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX) + $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig + $(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig $(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache + $(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG)) endef Host/Exports=$(Host/Exports/Default) @@ -214,9 +214,9 @@ export PKG_CONFIG HOSTCC:=gcc HOSTCXX:=g++ -HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include +HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR)/host/include) HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS) -HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib +HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR)/host/lib) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) TARGET_AR:=$(TARGET_CROSS)gcc-ar |