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 060db84efd249a9b1413d76a57272a1dca3f79e3..df56b31e581bcfa2983d26dd89a4ace330a6cc6e 100644
(file)
--- a/
board/mpc8641hpcn/Makefile
+++ b/
board/mpc8641hpcn/Makefile
@@
-23,39
+23,36
@@
include $(TOPDIR)/config.mk
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
-
-OBJS := $(BOARD).o pixis.o oftree.o
-SOBJS := init.o
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../freescale/common)
+endif
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $(OBJS)
+LIB = $(obj)lib$(BOARD).a
-ifndef DTC
-DTC := dtc
-endif
+COBJS := $(BOARD).o sys_eeprom.o \
+ ../freescale/common/pixis.o
-%.dtb: %.dts
- $(DTC) -f -V 0x10 -I dts -O dtb $< >$@
+SOBJS := init.o
-%.c: %.dtb
- xxd -i $< \
- | sed -e "s/^unsigned char/const unsigned char/g" \
- | sed -e "s/^unsigned int/const unsigned int/g" > $@
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
clean:
clean:
- rm -f $(OBJS) $(SOBJS) *.dtb oftree.c
+ rm -f $(OBJS) $(SOBJS)
+
.PHONY: distclean
distclean: clean
rm -f $(LIB) core *.bak .depend
#########################################################################
.PHONY: distclean
distclean: clean
rm -f $(LIB) core *.bak .depend
#########################################################################
-.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
#########################################################################
#########################################################################