From bfa5754a58477ac917d21527cd0f079d87cf188e Mon Sep 17 00:00:00 2001 From: Aubrey Li Date: Mon, 12 Mar 2007 01:42:06 +0800 Subject: [Blackfin][PATCH] Fix BUILD_DIR option of MAKEALL building issue --- cpu/bf533/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'cpu') diff --git a/cpu/bf533/Makefile b/cpu/bf533/Makefile index 6fd5e337c1b..ee7842a5d3d 100644 --- a/cpu/bf533/Makefile +++ b/cpu/bf533/Makefile @@ -26,23 +26,27 @@ include $(TOPDIR)/config.mk -LIB = lib$(CPU).a +LIB = $(obj)lib$(CPU).a START = start.o start1.o interrupt.o cache.o flush.o init_sdram.o -OBJS = cpu.o traps.o ints.o serial.o interrupts.o video.o +COBJS = cpu.o traps.o ints.o serial.o interrupts.o video.o EXTRA = init_sdram_bootrom_initblock.o -all: .depend $(START) $(LIB) .depend $(EXTRA) +SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +START := $(addprefix $(obj),$(START)) + +all: $(obj).depend $(START) $(LIB) $(obj).depend $(EXTRA) $(LIB): $(OBJS) - $(AR) cr $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) ######################################################################### -.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### -- cgit v1.3.1