From 017172577cf908a56ea18949d58977115a1aaf6a Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Wed, 10 Mar 2010 11:19:43 -0500 Subject: [PATCH] make an empty board.a this fixes errors when trying to build board.a when COBJS is empty. --- Makefile.include | 4 +++- config.mk | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index 16e42dc2e..84bb5c012 100644 --- a/Makefile.include +++ b/Makefile.include @@ -57,7 +57,9 @@ $(ISR): $(ISR:.o=.c) $(CC) $(CFLAGS) $(ARM_FLAGS) -MMD $< -c -o $@ @$(FINALIZE_DEPENDENCY) -$(OBJDIR)/board.a: $(OBJDIR)/board.a($(OBJDIR)/$(COBJS)) +empty-board-a: + $(AR) $(ARFLAGS) $(OBJDIR)/board.a +$(OBJDIR)/board.a: empty-board-a $(filter $(OBJDIR)/%.o, $(OBJDIR)/board.a($(OBJDIR)/$(COBJS))) $(MC1322X)/src/src.a: $(MC1322X)/src/src.a($(SRCOBJS)) %_$(BOARD).elf: $(OBJDIR)/%.o $(START) $(ISR) $(SRCOBJS) $(LINKERSCRIPT) $(LIBMC1322X)/libmc1322x.a $(OBJDIR)/board.a $(MC1322X)/src/src.a diff --git a/config.mk b/config.mk index a6156ec45..1b13d3667 100644 --- a/config.mk +++ b/config.mk @@ -24,6 +24,7 @@ DBGFLAGS= -g -DDEBUG OPTFLAGS= -Os #-fomit-frame-pointer LDSCRIPT := boot.lds OBJCFLAGS += --gap-fill=0xff +ARFLAGS = cru gccincdir := $(shell $(CC) -print-file-name=include)