From bd07d92aaddd32f7648d7e1f59d34a41019d4744 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 16 Mar 2009 15:48:43 +0000 Subject: [PATCH] Makefile: introduce $(HOST_DIR) for host binaries Add HOST_DIR directory handling. HOST_DIR should be used just like STAGING_DIR, but for host files instead of target ones. --- Makefile | 6 +++--- package/Makefile.in | 4 +++- project/Makefile.in | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6c8de893d1..fa44dc4e9f 100644 --- a/Makefile +++ b/Makefile @@ -282,7 +282,7 @@ $(BR2_DEPENDS_DIR): .config cp -dpRf $(CONFIG)/buildroot-config $@ dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \ + $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \ $(PROJECT_BUILD_DIR)/autotools-stamps $(BASE_TARGETS): dirs @@ -294,7 +294,7 @@ world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL) $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \ $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \ $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \ + $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(PROJECT_BUILD_DIR) \ $(PROJECT_BUILD_DIR)/autotools-stamps ############################################################# @@ -303,7 +303,7 @@ world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS_ALL) # dependencies anywhere else # ############################################################# -$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(PROJECT_BUILD_DIR) \ +$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(HOST_DIR) $(PROJECT_BUILD_DIR) \ $(PROJECT_BUILD_DIR)/autotools-stamps $(BINARIES_DIR): @mkdir -p $@ diff --git a/package/Makefile.in b/package/Makefile.in index 28099c69ab..42f0fcd4de 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -290,7 +290,9 @@ HOST_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ ORIGINAL_AS_FOR_TARGET="$(TARGET_AS)" \ ORIGINAL_LD_FOR_TARGET="$(TARGET_LD)" \ ORIGINAL_NM_FOR_TARGET="$(TARGET_NM)" \ - ORIGINAL_OBJDUMP_FOR_TARGET="$(TARGET_OBJDUMP)" + ORIGINAL_OBJDUMP_FOR_TARGET="$(TARGET_OBJDUMP)" \ + PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" \ + PKG_CONFIG_PATH="$(HOST_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" ####################################################################### # settings we need to pass to configure diff --git a/project/Makefile.in b/project/Makefile.in index fc73e407b6..a3a6664938 100644 --- a/project/Makefile.in +++ b/project/Makefile.in @@ -68,6 +68,9 @@ GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX))) STAGING_DIR:=$(strip $(subst ",, $(BR2_STAGING_DIR))) #")) +# packages compiled for the host goes here +HOST_DIR:=$(BUILD_DIR)/host_dir + # All configurable packages (like Busybox,Linux etc) should be built # in PROJECT_BUILD_DIR PROJECT_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)project_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(PROJECT) -- 2.30.2