From 2ede893aa6d0798d5a9a767ef940779138378877 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Mon, 26 May 2008 11:26:57 +0000 Subject: [PATCH] The feature set of gnumake is really frightening: This time I discovered 'target-specific variable values'... --- platform/apple2enh/Makefile.apple2enh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/platform/apple2enh/Makefile.apple2enh b/platform/apple2enh/Makefile.apple2enh index c18cc4bb6..a77257919 100644 --- a/platform/apple2enh/Makefile.apple2enh +++ b/platform/apple2enh/Makefile.apple2enh @@ -30,21 +30,14 @@ # # Author: Oliver Schmidt # -# $Id: Makefile.apple2enh,v 1.6 2008/05/26 10:13:32 oliverschmidt Exp $ +# $Id: Makefile.apple2enh,v 1.7 2008/05/26 11:26:57 oliverschmidt Exp $ # CONTIKI_SOURCEFILES += log-asm.S pfs.S - HIGHCODE_SOURCEFILES = process.c etimer.c uip_arp.c -define highcode_template -$(OBJECTDIR)/$(1:.c=.o): $(1) - $$(CC) --code-name HIGHCODE $$(CFLAGS) --create-dep $$< -o $$(@:.o=.s) - @$$(AS) $$(ASFLAGS) $$(@:.o=.s) -o $$@ - @sed 's!.s:!.o:!' < $$(@:.o=.u) > $$(@:.o=.d) - @rm -f $$(@:.o=.s) $$(@:.o=.u) -endef -${foreach OBJECT,$(HIGHCODE_SOURCEFILES),${eval ${call highcode_template,$(OBJECT)}}} +# Set a target-specific variable value +${addprefix $(OBJECTDIR)/,${call oname, $(HIGHCODE_SOURCEFILES)}}: CFLAGS += --code-name HIGHCODE CONTIKI_CPU = $(CONTIKI)/cpu/6502 include $(CONTIKI_CPU)/Makefile.6502