aboutsummaryrefslogtreecommitdiff
path: root/makefiles/module.mk
diff options
context:
space:
mode:
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)