projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure that argv[] argument pointers are not modified.
[oweals/u-boot.git]
/
board
/
amcc
/
acadia
/
Makefile
diff --git
a/board/amcc/acadia/Makefile
b/board/amcc/acadia/Makefile
index 183f694c7b88dc22a13ff4b19982ce1b4f09d39e..9abb29d85f262c461eec8f49c25250854a569a69 100644
(file)
--- a/
board/amcc/acadia/Makefile
+++ b/
board/amcc/acadia/Makefile
@@
-23,25
+23,29
@@
include $(TOPDIR)/config.mk
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB =
$(obj)
lib$(BOARD).a
-
OBJS = $(BOARD).o cpr.o memory
.o
+
COBJS = $(BOARD).o cmd_acadia.o memory.o pll
.o
SOBJS =
SOBJS =
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $(OBJS) $(SOBJS)
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
- rm -f $(LIB) core *.bak .depend
+ rm -f $(LIB) core *.bak
$(obj)
.depend
#########################################################################
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude
$(obj)
.depend
#########################################################################
#########################################################################