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
$(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
#############################################################
# 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 $@
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
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)