projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: fix out-of-tree building for some boards
[platform/kernel/u-boot.git]
/
cpu
/
sh3
/
Makefile
diff --git
a/cpu/sh3/Makefile
b/cpu/sh3/Makefile
index
1fdeb3c
..
441c765
100644
(file)
--- a/
cpu/sh3/Makefile
+++ b/
cpu/sh3/Makefile
@@
-31,19
+31,27
@@
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a
LIB = $(obj)lib$(CPU).a
-S
TART
= start.o
+S
OBJS
= start.o
OBJS = cpu.o interrupts.o watchdog.o time.o cache.o
OBJS = cpu.o interrupts.o watchdog.o time.o cache.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 .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
-sinclude .depend
+sinclude
$(obj)
.depend
#########################################################################
#########################################################################