build system: Fix out-of-tree building via BUILD_DIR_BASE

Closes #38
This commit is contained in:
Angus Gratton
2016-10-04 15:03:48 +11:00
parent 9c0cd10d48
commit 66882347e8
5 changed files with 31 additions and 32 deletions

View File

@@ -6,7 +6,7 @@
# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable,
# please read the esp-idf build system document if you need to do this.
#
-include $(PROJECT_PATH)/build/include/config/auto.conf
-include $(BUILD_DIR_BASE)/include/config/auto.conf
COMPONENT_SRCDIRS := . hwcrypto
@@ -44,6 +44,8 @@ $(COMPONENT_LIBRARY): $(ALL_LIB_FILES)
# saves us from having to add the target to a Makefile.projbuild
$(COMPONENT_LIBRARY): esp32_out.ld
# .. is BUILD_DIR_BASE here, as component makefiles
# are evaluated with CWD=component build dir
esp32_out.ld: $(COMPONENT_PATH)/ld/esp32.ld ../include/sdkconfig.h
$(CC) -I ../include -C -P -x c -E $< -o $@