aboutsummaryrefslogtreecommitdiff
path: root/makefiles/module.mk
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-05-23 00:08:35 +0200
committerpx4dev <px4@purgatory.org>2013-05-23 00:08:35 +0200
commit2135628254fa9035c3cbb7db8ed9c05bb3dd172a (patch)
treebae44417f027f7b4b6b90594851883aff808bf9d /makefiles/module.mk
parentc6b6b7ffcdd037965f13d82628cdad53072fcb23 (diff)
downloadpx4-firmware-2135628254fa9035c3cbb7db8ed9c05bb3dd172a.tar.gz
px4-firmware-2135628254fa9035c3cbb7db8ed9c05bb3dd172a.tar.bz2
px4-firmware-2135628254fa9035c3cbb7db8ed9c05bb3dd172a.zip
Hotfix: dependency scanning for modules was totally broken. Fix it so that changes to depended headers correctly cause modules to be rebuilt.
Diffstat (limited to 'makefiles/module.mk')
-rw-r--r--makefiles/module.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/makefiles/module.mk b/makefiles/module.mk
index 074cd159a..9e4cbafc9 100644
--- a/makefiles/module.mk
+++ b/makefiles/module.mk
@@ -183,12 +183,17 @@ CXXFLAGS += -fvisibility=$(DEFAULT_VISIBILITY) -include $(PX4_INCLUDE_DIR)visibi
#
module: $(MODULE_OBJ) $(MODULE_COMMAND_FILES)
-##
-## Object files we will generate from sources
-##
+#
+# Object files we will generate from sources
+#
OBJS = $(addsuffix .o,$(SRCS))
#
+# Dependency files that will be auto-generated
+#
+DEPS = $(addsuffix .d,$(SRCS))
+
+#
# SRCS -> OBJS rules
#
@@ -219,3 +224,5 @@ $(MODULE_OBJ): $(OBJS) $(GLOBAL_DEPS)
clean:
$(Q) $(REMOVE) $(MODULE_PRELINK) $(OBJS)
+
+-include $(DEPS)