]> rtime.felk.cvut.cz Git - omk/sssa.git/blobdiff - snippets/linux.omk
Added dependency of IDL generated files on IDL compiler
[omk/sssa.git] / snippets / linux.omk
index 9cf8f5c6206507d4b3aadaa28167210dcc4a596c..1b52ae3d343e8a0392d4d7e334ccec0a4fba3793 100644 (file)
@@ -18,6 +18,7 @@
 # rtlinux_MODULES  .. list of RT-Linux the kernel side modules/applications
 # xxx_SOURCES      .. list of specific target sources
 # xxx_LIBS         .. list of specific target libraries
+# lib_LOADLIBES    .. list of libraries linked to each executable
 # INCLUDES         .. additional include directories and defines for user-space
 # kernel_INCLUDES  .. additional include directories and defines for kernel-space
 # rtlinux_INCLUDES .. additional include directories and defines for RT-Linux
@@ -250,7 +251,7 @@ endef
 
 
 define COMPILE_idl_template
-$(2).c $(2)-stubs.c $(2)-skels.c $(2)-common.c $(2).h: $(1)
+$(2).c $(2)-stubs.c $(2)-skels.c $(2)-common.c $(2).h: $(1) $$(wildcard $$(firstword $$(idl_COMPILE)))
        @$(QUIET_CMD_ECHO) "  IDL     $$@"
        $(Q) $$(idl_COMPILE) $$($(2)_IDLFLAGS) $(1)
 endef
@@ -387,7 +388,7 @@ $(1)_shared_libs = $$(patsubst %,$(USER_LIB_DIR)/lib%.$(SOLIB_EXT),$$(filter $$(
 #$$(warning $(1)_shared_libs = $$($(1)_shared_libs))
 $(USER_LIB_DIR)/lib$(1).$(SOLIB_EXT): $$($(1)_shared_libs) $$($(1)_objslo)
        @$(QUIET_CMD_ECHO) "  LINK    $$@"
-       $(Q)$(CC) --shared -Xlinker -soname=lib$(1).$(SOLIB_EXT) -o $$@ $$($(1)_objslo) $$(LOADLIBES) $$($(1)_libs:%=-l%)
+       $(Q)$(CC) --shared -Xlinker -soname=lib$(1).$(SOLIB_EXT) -Wl,-Map,$(USER_OBJS_DIR)/lib$(1).$(SOLIB_EXT).map -o $$@ $$($(1)_objslo) $$(LOADLIBES) $$($(1)_libs:%=-l%)
 endef
 
 -include $(shell true; find $(USER_BUILD_DIR) -name 'lib*.omkvar') # `true' is a hack for MinGW
@@ -811,7 +812,7 @@ clean-local: clean-custom
 
 include-pass-submakes: extra-rules-subdirs
 
-# We must go to EXTRA_RULES_SUBDIRS beofre going to any other
+# We must go to EXTRA_RULES_SUBDIRS before going to any other
 # directory, since the executables compiled in EXTRA_RULES_SUBDIRS
 # might be needed there.
 include-pass-this-dir $(foreach subdir,$(SUBDIRS),include-pass-$(subdir)-subdir): extra-rules-subdirs