summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/make
diff options
context:
space:
mode:
authorNicolas Schodet2010-04-07 23:50:55 +0200
committerNicolas Schodet2010-04-07 23:50:55 +0200
commit36e5745b7b72749d95f71689478b06cc6b76245d (patch)
treea13036a021c6225e1ec62144338aff82687a3352 /digital/avr/make
parent0eff7675999eef0c1c3175a33e37d8d519cf7fa0 (diff)
digital/avr/make: fix simulation build
Diffstat (limited to 'digital/avr/make')
-rw-r--r--digital/avr/make/Makefile.avr11
1 files changed, 8 insertions, 3 deletions
diff --git a/digital/avr/make/Makefile.avr b/digital/avr/make/Makefile.avr
index bf92c0c4..bffca25a 100644
--- a/digital/avr/make/Makefile.avr
+++ b/digital/avr/make/Makefile.avr
@@ -24,7 +24,7 @@ avr: elf lst hex
simu: simuelf
-.PHONY: avr simu clean.avr elf simuelf lst \
+.PHONY: avr simu clean.avr clean.simu elf simuelf lst \
text hex srec bin eeprom ehex esrec ebin
# General rules.
@@ -47,12 +47,17 @@ define AVR_PROG_template
$(1).avr.elf: $$(patsubst %.S,$(OBJDIR)/%.avr.o,\
$$(patsubst %.c,$(OBJDIR)/%.avr.o,\
$$(filter-out %.host.c,$$($(1)_SOURCES))))
+endef
+
+$(foreach prog,$(AVR_PROGS),$(eval $(call AVR_PROG_template,$(prog))))
+
+define SIMU_PROG_template
$(1).avr.simu.elf: $$(patsubst %.S,$(OBJDIR)/%.avr.simu.o,\
$$(patsubst %.c,$(OBJDIR)/%.avr.simu.o,\
$$(filter-out %.host.c,$$($(1)_SOURCES))))
endef
-$(foreach prog,$(AVR_PROGS),$(eval $(call AVR_PROG_template,$(prog))))
+$(foreach prog,$(SIMU_PROGS),$(eval $(call SIMU_PROG_template,$(prog))))
$(AVR_ELFS) $(AVR_SIMU_ELFS):
$(AVR_LINK.o) $^ $(AVR_LDLIBS) -o $@
@@ -122,5 +127,5 @@ clean.avr:
*.avr.lst *.avr.map $(TEXTS) $(EEPROMS)
clean.simu:
- rm -f $(OBJDIR)/*.avr.simu.o *.avr.simu.d $(AVR_SIMU_ELFS)
+ rm -f $(OBJDIR)/*.avr.simu.o $(OBJDIR)/*.avr.simu.d $(AVR_SIMU_ELFS)