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 with git://www.denx.de/git/u-boot.git
[oweals/u-boot.git]
/
board
/
mpc8641hpcn
/
Makefile
diff --git
a/board/mpc8641hpcn/Makefile
b/board/mpc8641hpcn/Makefile
index f70f44ba2a1cc794d92d96c6e457eede0edf23ba..df56b31e581bcfa2983d26dd89a4ace330a6cc6e 100644
(file)
--- a/
board/mpc8641hpcn/Makefile
+++ b/
board/mpc8641hpcn/Makefile
@@
-23,13
+23,23
@@
include $(TOPDIR)/config.mk
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../freescale/common)
+endif
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS := $(BOARD).o sys_eeprom.o \
+ ../freescale/common/pixis.o
-OBJS := $(BOARD).o pixis.o sys_eeprom.o
SOBJS := init.o
SOBJS := init.o
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $(OBJS)
+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 $(OBJS) $(SOBJS)
clean:
rm -f $(OBJS) $(SOBJS)
@@
-40,10
+50,9
@@
distclean: clean
#########################################################################
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
-ifeq ($(filter distclean, $(MAKECMDGOALS)),)
--include .depend
-endif
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude ($obj).depend
#########################################################################
#########################################################################