summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
Diffstat (limited to 'n')
-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