X-Git-Url: http://rtime.felk.cvut.cz/gitweb/rtems-devel.git/blobdiff_plain/23c6af9c614e0d42ab109f9e833a2e82ea8bd4e7..HEAD:/rtems-omk-template/Makefile.rules diff --git a/rtems-omk-template/Makefile.rules b/rtems-omk-template/Makefile.rules index 5160614..3888749 100644 --- a/rtems-omk-template/Makefile.rules +++ b/rtems-omk-template/Makefile.rules @@ -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/ -# Version: 0.2-173-g6a298fc +# Version: 0.2-177-g8b0dfa8 # # The OMK build system is distributed under the GNU General Public # License. See file COPYING for details. @@ -566,10 +566,10 @@ $(2)/$(1): $(USER_LIB_DIR)/timestamp $(2)/$(1): $$($(1)_OBJS) @$(QUIET_CMD_ECHO) " LINK $$@" $(Q) if [ -z "$$($(1)_EXPORTSYMBOLS)" ] ; then \ - $$($(1)_LDCOMMAND) $$(LOADLIBES) $$($(1)_LIBS:%=-l%) -o $(2)/$(1) || exit 1; \ + $$($(1)_LDCOMMAND) $$(LOADLIBES) $$($(1)_LIBS:%=-l%) -Wl,-Map,$(USER_OBJS_DIR)/$(1).exe.map -o $(2)/$(1) || exit 1; \ else \ rm -f $(1).prelink ; \ - $$($(1)_LDCOMMAND) $$(LOADLIBES) $$($(1)_LIBS:%=-l%) -o $(1).prelink || exit 1 ; \ + $$($(1)_LDCOMMAND) $$(LOADLIBES) $$($(1)_LIBS:%=-l%) -Wl,-Map,$(USER_OBJS_DIR)/$(1).exe.map -o $(1).prelink || exit 1 ; \ $(RTEMS_SYSM) -e -c "$$(CC) $$(CPPFLAGS) $$(OMK_CPPFLAGS) $$(OMK_CFLAGS) $$(CFLAGS)" \ -S $(1)-symbol-table.c -o $(1)-symbol-table.o $(1).prelink || exit 1 ; \ $$($(1)_LDCOMMAND) $(1)-symbol-table.o $$(LOADLIBES) $$($(1)_LIBS:%=-l%) -o $(2)/$(1) || exit 1 ; \ @@ -660,6 +660,12 @@ $(foreach lib,$(lib_LIBRARIES),$(eval $(call LIBRARY_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=%))))