Patchwork [U-Boot] xilinx-ppc4xx-generic: Fix Makefile to work with MAKEALL

login
register
mail settings
Submitter Ricardo Ribalda
Date Dec. 24, 2010, 12:38 a.m.
Message ID <1293151090-27153-1-git-send-email-ricardo.ribalda@gmail.com>
Download mbox | patch
Permalink /patch/76561/
State Accepted
Commit 7e4c3a41ce2e9ace8bbca125a81f7397ba91e536
Delegated to: Stefan Roese
Headers show

Comments

Ricardo Ribalda - Dec. 24, 2010, 12:38 a.m.
config.mk only mkdirs $(obj), but we have objects shared with other
boards located on other dirs.

This patch mkdirs the needed dirs for the xlnx-generic boards.
---
 board/xilinx/ppc405-generic/Makefile |   11 +++--------
 board/xilinx/ppc440-generic/Makefile |   14 ++++----------
 2 files changed, 7 insertions(+), 18 deletions(-)
Stefan Roese - Jan. 11, 2011, 9:59 a.m.
On Friday 24 December 2010 01:38:10 Ricardo Ribalda Delgado wrote:
> config.mk only mkdirs $(obj), but we have objects shared with other
> boards located on other dirs.
> 
> This patch mkdirs the needed dirs for the xlnx-generic boards.

Applied to u-boot-ppc4xx/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de

Patch

diff --git a/board/xilinx/ppc405-generic/Makefile b/board/xilinx/ppc405-generic/Makefile
index 717ffc9..501fd46 100644
--- a/board/xilinx/ppc405-generic/Makefile
+++ b/board/xilinx/ppc405-generic/Makefile
@@ -27,12 +27,9 @@ 
 
 include $(TOPDIR)/config.mk
 ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../../xilinx/ppc405-generic)
 endif
 
-INCS		:=
-CFLAGS		+= $(INCS)
-HOSTCFLAGS	+= $(INCS)
-
 LIB	= $(obj)lib$(BOARD).o
 
 COBJS	+= ../../xilinx/ppc405-generic/xilinx_ppc405_generic.o
@@ -41,10 +38,8 @@  SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-all: $(LIB) $(SOBJS)
-
-$(LIB):	$(OBJS)
-	$(call cmd_link_o_target, $^)
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS))
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
diff --git a/board/xilinx/ppc440-generic/Makefile b/board/xilinx/ppc440-generic/Makefile
index 1760e4e..ed2cf9f 100644
--- a/board/xilinx/ppc440-generic/Makefile
+++ b/board/xilinx/ppc440-generic/Makefile
@@ -27,26 +27,20 @@ 
 
 include $(TOPDIR)/config.mk
 ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../../xilinx/ppc440-generic)
 endif
 
-INCS		:=
-CFLAGS		+= $(INCS)
-HOSTCFLAGS	+= $(INCS)
-
 LIB	= $(obj)lib$(BOARD).o
 
 COBJS	+= ../../xilinx/ppc440-generic/xilinx_ppc440_generic.o
-
-SOBJS	+= ../../xilinx/ppc440-generic/init.o
+SOBJS 	+= ../../xilinx/ppc440-generic/init.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-all: $(LIB) $(SOBJS)
-
-$(LIB):	$(OBJS)
-	$(call cmd_link_o_target, $^)
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS))
 
 clean:
 	rm -f $(SOBJS) $(OBJS)