summaryrefslogtreecommitdiffstats
path: root/cpu/sh2
diff options
context:
space:
mode:
authorKieran Bingham <kieranbingham@gmail.com>2008-12-30 01:16:03 +0000
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2009-01-16 10:22:27 +0900
commita5b04d00bfeb940c62232972ce644d50b45797f9 (patch)
treedc69df27186d66f99acf3dd409428d1ab7491d65 /cpu/sh2
parentf7e78f3b74aae9caca2997bad865a72338326c0a (diff)
downloadu-boot-a5b04d00bfeb940c62232972ce644d50b45797f9.tar.gz
u-boot-a5b04d00bfeb940c62232972ce644d50b45797f9.tar.xz
u-boot-a5b04d00bfeb940c62232972ce644d50b45797f9.zip
sh: Fix up rsk7203 target for out of tree build
Fix up rsk7203 target to build successfully using out-of-tree build. Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'cpu/sh2')
-rw-r--r--cpu/sh2/Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/cpu/sh2/Makefile b/cpu/sh2/Makefile
index e33ba0f2a9..346d3285db 100644
--- a/cpu/sh2/Makefile
+++ b/cpu/sh2/Makefile
@@ -28,18 +28,23 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a
-START = start.o
-OBJS = cpu.o interrupts.o watchdog.o
+SOBJS = start.o
+COBJS = cpu.o interrupts.o watchdog.o
-all: .depend $(START) $(LIB)
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
-$(LIB): $(OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
+$(LIB): $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
-#########################################################################
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
-.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