Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
$(foreach lib,$(shared_LIBRARIES),$(eval $(call SOLIB_template,$(lib))))
$(foreach lib,$(shared_LIBRARIES),$(eval $(call SOLIB_template,$(lib))))
+# Create _build directories for sources in subdirectories i.e. *_SOURCES=dir/file.c
+_dirs_to_create=$(filter-out ./,$(sort $(dir $(USER_SOURCES) $(SOLIB_SOURCES))))
+ifneq ($(_dirs_to_create),)
+$(shell mkdir -p $(addprefix $(LOCAL_BUILD_DIR)/,$(_dirs_to_create)))
+endif
+
# IDL compilation
USER_IDLS := $(sort $(USER_IDLS))
$(foreach src,$(filter %.idl,$(USER_IDLS)),$(eval $(call COMPILE_idl_template,$(SOURCES_DIR)/$(src),$(src:%.idl=%))))
# IDL compilation
USER_IDLS := $(sort $(USER_IDLS))
$(foreach src,$(filter %.idl,$(USER_IDLS)),$(eval $(call COMPILE_idl_template,$(SOURCES_DIR)/$(src),$(src:%.idl=%))))
USER_SOURCES := $(sort $(USER_SOURCES))
#$(warning USER_SOURCES = $(USER_SOURCES))
USER_SOURCES := $(sort $(USER_SOURCES))
#$(warning USER_SOURCES = $(USER_SOURCES))
+# Create _build directories for sources in subdirectories i.e. *_SOURCES=dir/file.c
+_dirs_to_create=$(filter-out ./,$(sort $(dir $(USER_SOURCES))))
+ifneq ($(_dirs_to_create),)
+$(shell mkdir -p $(addprefix $(LOCAL_BUILD_DIR)/,$(_dirs_to_create)))
+endif
# The above generated rules produced $(USER_SOURCES) and $(SOLIB_SOURCES)
# variables. Now generate rules for compilation of theese USER_SOURCES
# The above generated rules produced $(USER_SOURCES) and $(SOLIB_SOURCES)
# variables. Now generate rules for compilation of theese USER_SOURCES