]> granicus.if.org Git - esp-idf/blobdiff - make/project.mk
Merge branch 'master' into bugfix/build_dir_base
[esp-idf] / make / project.mk
index d91165cfd751d16d6449904d891df15aef2e0e4c..2b2eff3f5ecc719242b8630b7248725c629d6e35 100644 (file)
@@ -37,6 +37,7 @@ help:
        @echo "'make partition_table', etc, etc."
 
 # disable built-in make rules, makes debugging saner
+MAKEFLAGS_OLD := $(MAKEFLAGS)
 MAKEFLAGS +=-rR
 
 # Figure out PROJECT_PATH if not set
@@ -50,6 +51,7 @@ endif
 #The directory where we put all objects/libraries/binaries. The project Makefile can
 #configure this if needed.
 BUILD_DIR_BASE ?= $(PROJECT_PATH)/build
+export BUILD_DIR_BASE
 
 #Component directories. These directories are searched for components.
 #The project Makefile can override these component dirs, or define extra component directories.
@@ -105,7 +107,7 @@ COMPONENT_INCLUDES := $(abspath $(foreach comp,$(COMPONENT_PATHS_BUILDABLE),$(ad
        $(call GetVariable,$(comp),COMPONENT_ADD_INCLUDEDIRS))))
 
 #Also add project include path, for sdk includes
-COMPONENT_INCLUDES += $(PROJECT_PATH)/build/include/
+COMPONENT_INCLUDES += $(abspath $(BUILD_DIR_BASE)/include/)
 export COMPONENT_INCLUDES
 
 #COMPONENT_LDFLAGS has a list of all flags that are needed to link the components together. It's collected
@@ -230,7 +232,7 @@ define GenerateComponentPhonyTarget
 # $(2) - target to generate (build, clean)
 .PHONY: $(notdir $(1))-$(2)
 $(notdir $(1))-$(2): | $(BUILD_DIR_BASE)/$(notdir $(1))
-       @+$(MAKE) -C $(BUILD_DIR_BASE)/$(notdir $(1)) -f $(1)/component.mk COMPONENT_BUILD_DIR=$(BUILD_DIR_BASE)/$(notdir $(1)) $(2)
+       $(Q) +$(MAKE) -C $(BUILD_DIR_BASE)/$(notdir $(1)) -f $(1)/component.mk COMPONENT_BUILD_DIR=$(BUILD_DIR_BASE)/$(notdir $(1)) $(2)
 endef
 
 define GenerateComponentTargets