Initially I had to use the first line (now commented) in this component.mk, but after some searching came up with the second line to find the subdirectories and add them to COMPONENT_SRCDIRS, and didn't really understand why it worked but it did
Unfortunately now moving to another computer, I cannot get the lower line to work despite the same tree structure and get undefined references. The msys32 installation is about 6 months newer if that matters.
Anyone know how to include a whole subdirectory tree in the source directories?
This component.mk is at the same level as the directory "src", so I want to include everything inside there automagically.
Code: Select all
#
# Main component makefile.
#
# This Makefile can be left empty. By default, it will take the sources in the
# src/ directory, compile them and link them into lib(subdirectory_name).a
# in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#
#COMPONENT_SRCDIRS := src/SeedKey src/SeedKey/MED17/1.1 src/SeedKey/MED17/8.3
COMPONENT_SRCDIRS := . $(notdir $(shell find -L $(COMPONENT_PATH) -maxdepth 1 -mindepth 1 -type d))