summaryrefslogtreecommitdiff
path: root/n/avr/make/Makefile.gen
diff options
context:
space:
mode:
authorschodet2006-01-17 17:13:21 +0000
committerschodet2006-01-17 17:13:21 +0000
commitb21180971f202d8390995ed76e15eb5e90b98e9d (patch)
tree28f1f911d944f13868aefe80487bbc880872fa6c /n/avr/make/Makefile.gen
parent435b5a9adaa251e8d72ccf5b744db80296b30908 (diff)
Ajout du support de modules par executable.
Diffstat (limited to 'n/avr/make/Makefile.gen')
-rw-r--r--n/avr/make/Makefile.gen7
1 files changed, 6 insertions, 1 deletions
diff --git a/n/avr/make/Makefile.gen b/n/avr/make/Makefile.gen
index ec1995a..e403923 100644
--- a/n/avr/make/Makefile.gen
+++ b/n/avr/make/Makefile.gen
@@ -29,8 +29,13 @@ ifneq (,$(MODULES))
include $(MODULES:%=$(BASE)/modules/%/Makefile.module)
endif
+none_SOURCES =
+
define MODULES_template
-$(1)_SOURCES += $(foreach module,$(MODULES),$($(subst /,_,$(module))_SOURCES))
+$(1)_SOURCES += $(foreach module,\
+ $(if $($(1)_MODULES),$($(1)_MODULES),$(MODULES)),\
+ $($(subst /,_,$(module))_SOURCES)\
+)
endef
$(foreach prog,$(ALL_PROGS),$(eval $(call MODULES_template,$(prog))))