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
This commit is contained in:
parent
36502c5a6f
commit
03bc8d94f0
|
@ -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)
|
||||
|
||||
|
|
4
rules.mk
4
rules.mk
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue