galileo: Add support for old versions of GNU Make

This patch revises a Makefile to avoid using a feature that is
incompatible with GNU Make v.3.81.
This commit is contained in:
Michael LeMay 2015-11-20 15:07:51 -08:00 committed by Jesus Sanchez-Palencia
parent 0e99ebbded
commit 09d168da04

View file

@ -24,15 +24,16 @@ debug: $(MULTIBOOT)
@$(GDB) $< -ex "target remote :3333"
CUSTOM_RULE_LINK=1
define LINK_template =
%.$(1): %.co $$(PROJECT_OBJECTFILES) $$(PROJECT_LIBRARIES) contiki-$$(TARGET).a
$$(TRACE_LD)
$$(Q)$$(LD) $$(LDFLAGS) $(2) $$(TARGET_STARTFILES) $${filter-out %.a,$$^} \
$${filter %.a,$$^} $$(TARGET_LIBFILES) -o $$@
endef
$(eval $(call LINK_template,$(MULTIBOOT_SFX),$(MULTIBOOT_LDFLAGS)))
$(eval $(call LINK_template,$(UEFI_DLL_SFX),$(UEFI_LDFLAGS)))
%.$(MULTIBOOT_SFX): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
$(TRACE_LD)
$(Q)$(LD) $(LDFLAGS) $(MULTIBOOT_LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} \
${filter %.a,$^} $(TARGET_LIBFILES) -o $@
%.$(UEFI_DLL_SFX): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
$(TRACE_LD)
$(Q)$(LD) $(LDFLAGS) $(UEFI_LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} \
${filter %.a,$^} $(TARGET_LIBFILES) -o $@
%.$(UEFI_SFX): %.$(UEFI_DLL_SFX)
$(Q)$(GEN_FW) -o $@ -e UEFI_APPLICATION $^