summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorAubrey Li <aubrey.adi@gmail.com>2007-03-12 01:42:06 +0800
committerAubrey Li <aubrey.adi@gmail.com>2007-03-12 01:42:06 +0800
commitbfa5754a58477ac917d21527cd0f079d87cf188e (patch)
tree652858c54d5f15eb1ccf58d6d775d6a157f6cf00 /cpu
parent8440bb14581a294375c34b91b42512f9753d1130 (diff)
downloadu-boot-imx-bfa5754a58477ac917d21527cd0f079d87cf188e.zip
u-boot-imx-bfa5754a58477ac917d21527cd0f079d87cf188e.tar.gz
u-boot-imx-bfa5754a58477ac917d21527cd0f079d87cf188e.tar.bz2
[Blackfin][PATCH] Fix BUILD_DIR option of MAKEALL building issue
Diffstat (limited to 'cpu')
-rw-r--r--cpu/bf533/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/cpu/bf533/Makefile b/cpu/bf533/Makefile
index 6fd5e33..ee7842a 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
#########################################################################