summaryrefslogtreecommitdiff
path: root/n/avr/rs232
diff options
context:
space:
mode:
Diffstat (limited to 'n/avr/rs232')
-rw-r--r--n/avr/rs232/Makefile.avr38
1 files changed, 21 insertions, 17 deletions
diff --git a/n/avr/rs232/Makefile.avr b/n/avr/rs232/Makefile.avr
index 1bcf944..b3ceb39 100644
--- a/n/avr/rs232/Makefile.avr
+++ b/n/avr/rs232/Makefile.avr
@@ -20,6 +20,25 @@ all: elf lst hex
.PHONY: all clean elf lst doc text hex srec bin eeprom ehex esrec ebin
+# Rules for modules. {{{1
+
+MODULESFILES = $(MODULES:%=modules/%/Module)
+
+Makefile: $(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=%)
+ test -f $@
+
+# General rules. {{{1
+
elf: $(PROGS:%=%.elf)
lst: $(PROGS:%=%.lst)
@@ -30,8 +49,8 @@ $(PROGS:%=%.elf): $(OBJECTS)
$(OBJDUMP) -h -S $< > $@
clean:
- rm -f *.o $(PROGS:%=%.elf) *.lst *.map *.bak *~ $(DOC) *.exd
- rm -f $(EXTRA_CLEAN_FILES) $(TEXTS) $(EEPROMS)
+ rm -f *.o $(OBJECTS) $(PROGS:%=%.elf) *.lst *.map *.bak *~
+ rm -f $(DOC) *.exd $(EXTRA_CLEAN_FILES) $(TEXTS) $(EEPROMS)
# Rules for building the doc. {{{1
@@ -43,21 +62,6 @@ doc: $(DOC)
%.exd: $(EXTRACTDOC)
test -n "$^" && extractdoc $^ > $@ || true
-# Rules for modules. {{{1
-
-MODULESFILES = $(MODULES:%=modules/%/Module)
-
-Makefile: $(MODULESFILES)
-
-MODULESOURCES = $(addprefix $(module)/,$(shell cat modules/$(module)/Module))
-MODULESSOURCES := $(if $(MODULES),\
- $(foreach module,$(MODULES),$(MODULESOURCES)))
-
-$(MODULESFILES):
- mkdir -p modules
- cd modules && cvs co $(@:modules/%/Module=%)
- test -f $@
-
# Rules for building the .text rom images. {{{1
TEXTS = $(PROGS:%=%.hex) $(PROGS:%=%.bin) $(PROGS:%=%.srec)