summaryrefslogtreecommitdiff
path: root/n/avr
diff options
context:
space:
mode:
authorschodet2004-07-18 21:10:29 +0000
committerschodet2004-07-18 21:10:29 +0000
commit0492a96051eebf99e9d87ece3052def8452dddf9 (patch)
tree546c7f1558adb10d292005f7fdefad9157cc6903 /n/avr
parent242c197236e9900b31900518895362390d62d5c2 (diff)
Nouveau système de modules.
Diffstat (limited to 'n/avr')
-rw-r--r--n/avr/howto/Makefile1
-rw-r--r--n/avr/howto/Makefile.avr13
2 files changed, 6 insertions, 8 deletions
diff --git a/n/avr/howto/Makefile b/n/avr/howto/Makefile
index 2ac6571..25dfd1a 100644
--- a/n/avr/howto/Makefile
+++ b/n/avr/howto/Makefile
@@ -3,6 +3,7 @@ SOURCES = example.c
DOC = howto-avr.html
EXTRACTDOC =
MODULES =
+CONFIGFILE =
# atmega8, atmega8535, atmega128...
MCU_TARGET = atmega8
# -O2 : speed
diff --git a/n/avr/howto/Makefile.avr b/n/avr/howto/Makefile.avr
index d1411f4..01c9b7b 100644
--- a/n/avr/howto/Makefile.avr
+++ b/n/avr/howto/Makefile.avr
@@ -2,7 +2,8 @@
CC = avr-gcc
-CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET)
+CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) \
+ $(if $(CONFIGFILE), $(CONFIGFILE:%=-include %))
CPPFLAGS = $(DEFS) -Imodules
LDFLAGS =
@@ -22,19 +23,15 @@ all: elf lst hex
# Rules for modules. {{{1
-MODULESFILES = $(MODULES:%=modules/%/Module)
+MODULESFILES = $(MODULES:%=modules/%/Makefile.module)
-Makefile: $(MODULESFILES)
+include $(MODULESFILES)
-MODULESOURCES = $(addprefix modules/$(module)/,\
- $(shell cat modules/$(module)/Module))
-MODULESSOURCES := $(if $(MODULES),\
- $(foreach module,$(MODULES),$(MODULESOURCES)))
SOURCES += $(MODULESSOURCES)
$(MODULESFILES):
mkdir -p modules
- cd modules && cvs co $(@:modules/%/Module=%)
+ cd modules && cvs co $(@:modules/%/Makefile.module=%)
test -f $@
# General rules. {{{1