aboutsummaryrefslogtreecommitdiff
path: root/makefiles/module.mk
diff options
context:
space:
mode:
Diffstat (limited to 'makefiles/module.mk')
-rw-r--r--makefiles/module.mk31
1 files changed, 9 insertions, 22 deletions
diff --git a/makefiles/module.mk b/makefiles/module.mk
index db6f4e15e..9e4cbafc9 100644
--- a/makefiles/module.mk
+++ b/makefiles/module.mk
@@ -35,7 +35,7 @@
# This makefile is invoked by firmware.mk to build each of the modules
# that will subsequently be linked into the firmware image.
#
-# Applications are built as prelinked objects with a limited set of exported
+# Modules are built as prelinked objects with a limited set of exported
# symbols, as the global namespace is shared between all modules. Normally an
# module will just export one or more <command>_main functions.
#
@@ -183,30 +183,15 @@ CXXFLAGS += -fvisibility=$(DEFAULT_VISIBILITY) -include $(PX4_INCLUDE_DIR)visibi
#
module: $(MODULE_OBJ) $(MODULE_COMMAND_FILES)
-##
-## Locate sources (allows relative source paths in module.mk)
-##
-#define SRC_SEARCH
-# $(abspath $(firstword $(wildcard $1) $(wildcard $(MODULE_SRC)/$1) MISSING_$1))
-#endef
#
-#ABS_SRCS ?= $(foreach src,$(SRCS),$(call SRC_SEARCH,$(src)))
-#MISSING_SRCS := $(subst MISSING_,,$(filter MISSING_%,$(ABS_SRCS)))
-#ifneq ($(MISSING_SRCS),)
-#$(error $(MODULE_MK): missing in SRCS: $(MISSING_SRCS))
-#endif
-#ifeq ($(ABS_SRCS),)
-#$(error $(MODULE_MK): nothing to compile in SRCS)
-#endif
+# Object files we will generate from sources
#
-##
-## Object files we will generate from sources
-##
-#OBJS := $(foreach src,$(ABS_SRCS),$(MODULE_WORK_DIR)$(src).o)
+OBJS = $(addsuffix .o,$(SRCS))
-OBJS = $(addsuffix .o,$(SRCS))
-$(info SRCS $(SRCS))
-$(info OBJS $(OBJS))
+#
+# Dependency files that will be auto-generated
+#
+DEPS = $(addsuffix .d,$(SRCS))
#
# SRCS -> OBJS rules
@@ -239,3 +224,5 @@ $(MODULE_OBJ): $(OBJS) $(GLOBAL_DEPS)
clean:
$(Q) $(REMOVE) $(MODULE_PRELINK) $(OBJS)
+
+-include $(DEPS)