summaryrefslogtreecommitdiff
path: root/n/avr/make/Makefile.gen
diff options
context:
space:
mode:
authorschodet2005-07-22 21:41:01 +0000
committerschodet2005-07-22 21:41:01 +0000
commit3742cbc92d0203080a57b93ca56cf6dc116e818f (patch)
treeba1ab3521af4ad0c244b8fb8c9ae37924598a98b /n/avr/make/Makefile.gen
parent0f9db44ec7e0d92caeeeab4347f8aed8c5a978fe (diff)
Ajout du support de AVR_PROGS et HOST_PROGS.
Ajout du support de sous-modules.
Diffstat (limited to 'n/avr/make/Makefile.gen')
-rw-r--r--n/avr/make/Makefile.gen11
1 files changed, 7 insertions, 4 deletions
diff --git a/n/avr/make/Makefile.gen b/n/avr/make/Makefile.gen
index baa18d0..7e34c2b 100644
--- a/n/avr/make/Makefile.gen
+++ b/n/avr/make/Makefile.gen
@@ -17,19 +17,22 @@ all: avr host
# General rules. {{{1
-SOURCES = $(foreach prog,$(PROGS),$($(prog)_SOURCES))
+ALL_PROGS = $(PROGS) $(AVR_PROGS) $(HOST_PROGS)
+SOURCES = $(foreach prog,$(ALL_PROGS),$($(prog)_SOURCES))
# Modules. {{{1
+MODULES += host
+
ifneq (,$(MODULES))
include $(MODULES:%=$(BASE)/modules/%/Makefile.module)
endif
define MODULES_template
-$(1)_SOURCES += $(foreach module,$(MODULES),$($(module)_SOURCES))
+$(1)_SOURCES += $(foreach module,$(MODULES),$($(subst /,_,$(module))_SOURCES))
endef
-$(foreach prog,$(PROGS),$(eval $(call MODULES_template,$(prog))))
+$(foreach prog,$(ALL_PROGS),$(eval $(call MODULES_template,$(prog))))
vpath %.c $(MODULES:%=$(BASE)/modules/%)
@@ -57,7 +60,7 @@ ifneq (,$(filter-out %.c,$(SOURCES)))
$(error Sources should be c files)
endif
-ifneq (,$(PROGS))
+ifneq (,$(ALL_PROGS))
include $(BASE)/make/Makefile.avr
include $(BASE)/make/Makefile.host
else