projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://www.denx.de/git/u-boot-net
[oweals/u-boot.git]
/
board
/
prodrive
/
pdnb3
/
Makefile
diff --git
a/board/prodrive/pdnb3/Makefile
b/board/prodrive/pdnb3/Makefile
index f3cd5a3f18db3235e611c3823bf77559d9b243e5..d07f25f98185eb72d5e2ca2c802f1728c16eced6 100644
(file)
--- a/
board/prodrive/pdnb3/Makefile
+++ b/
board/prodrive/pdnb3/Makefile
@@
-23,24
+23,28
@@
include $(TOPDIR)/config.mk
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB =
$(obj)
lib$(BOARD).a
-
OBJS
:= flash.o pdnb3.o nand.o
+
COBJS
:= flash.o pdnb3.o nand.o
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $^
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS)
+ $(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 $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-
-include
.depend
+
sinclude $(obj)
.depend
#########################################################################
#########################################################################