Fix a makefile dependency with libraries

Using the implicit rules for libraries leads to problems if one of the
objects fails to build, but the others are still OK.  Just make all
library rules explicit to avoid this.
This commit is contained in:
Jim Paris 2010-09-28 15:48:57 -04:00
parent 6b4d6a9ade
commit 03293b60ad
4 changed files with 19 additions and 8 deletions

View file

@ -8,11 +8,17 @@ SRC_OBJS += $(MC1322X)/src/default_lowlevel.o $(ISR)
# Two libraries, one with ROM variable space reserved, one without
START_ROMVARS ?= $(MC1322X)/src/start-romvars.o
SRCLIB_ROMVARS = $(MC1322X)/src/src-romvars.a
$(SRCLIB_ROMVARS): $(SRCLIB_ROMVARS)($(SRC_OBJS) $(START_ROMVARS))
$(SRCLIB_ROMVARS): $(SRC_OBJS) $(START_ROMVARS)
$(call pretty,AR,$@)
@rm -f $@
$Q$(AR) $(ARFLAGS) $@ $^
START ?= $(MC1322X)/src/start.o
SRCLIB = $(MC1322X)/src/src.a
$(SRCLIB): $(SRCLIB)($(SRC_OBJS) $(START))
$(SRCLIB): $(SRC_OBJS) $(START)
$(call pretty,AR,$@)
@rm -f $@
$Q$(AR) $(ARFLAGS) $@ $^
# ISR is built without thumb
$(ISR): $(ISR:.o=.c)