]> rtime.felk.cvut.cz Git - rtems-devel.git/commitdiff
OMK Makefile.rules updated to allow specification of subdirectories in SOURCES.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Wed, 16 Sep 2015 19:09:31 +0000 (21:09 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Wed, 16 Sep 2015 19:09:31 +0000 (21:09 +0200)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
rtems-omk-template/Makefile.rules

index 51606141639cc0b9c3975756e84226350386bbf3..00510cc9b9448c4ecf14328ded4b93b045f62f76 100644 (file)
@@ -4,7 +4,7 @@
 #  (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2015 by Michal Sojka - Czech Technical University, FEE, DCE
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
 #  (C) Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2015 by Michal Sojka - Czech Technical University, FEE, DCE
 #
 #  Homepage: http://rtime.felk.cvut.cz/omk/
-#  Version:  0.2-173-g6a298fc
+#  Version:  0.2-174-g15f6d83
 #
 # The OMK build system is distributed under the GNU General Public
 # License.  See file COPYING for details.
 #
 # The OMK build system is distributed under the GNU General Public
 # License.  See file COPYING for details.
@@ -660,6 +660,12 @@ $(foreach lib,$(lib_LIBRARIES),$(eval $(call LIBRARY_template,$(lib))))
 
 $(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=%))))