Skip to contentSkip to conversation

PXA: Fix off-the-tree build problems

PATCH New Marek Vasut 2 participants 6 messages Aug 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 PXA: Fix off-the-tree build problems

---
V2:
Add missing $(obj) before .depend in the following line:
rm -f $(LIB) core *.bak $(obj).depend

 board/colibri_pxa270/Makefile |   20 ++++++++++++--------
 board/vpac270/Makefile        |   20 ++++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)
board/colibri_pxa270/Makefile +12 -8
index 44d73cc..ae570e1 100644
@@ -21,25 +21,29 @@
 
 include $(TOPDIR)/config.mk
 
-LIB	= lib$(BOARD).a
+LIB	= $(obj)lib$(BOARD).a
 
-OBJS	:= colibri_pxa270.o
+COBJS	:= colibri_pxa270.o
 SOBJS	:= lowlevel_init.o
 
-$(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) $(SOBJS)
 
 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
 
 #########################################################################
board/vpac270/Makefile +12 -8
index 0f3eacd..c6f4c7c 100644
@@ -24,25 +24,29 @@
 
 include $(TOPDIR)/config.mk
 
-LIB	= lib$(BOARD).a
+LIB	= $(obj)lib$(BOARD).a
 
-OBJS	:= vpac270.o
+COBJS	:= vpac270.o
 SOBJS	:= lowlevel_init.o
 
-$(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) $(SOBJS)
 
 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
 
 #########################################################################
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/3 PXA: Fix missing includes

---
 board/colibri_pxa270/colibri_pxa270.c |    1 +
 board/vpac270/vpac270.c               |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
board/colibri_pxa270/colibri_pxa270.c +1 -0
index d3822f0..84ec38e 100644
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/vpac270/vpac270.c +1 -0
index 48e93ab..18e47e2 100644
@@ -30,6 +30,7 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/3 PXA: Fix missing includes

Dear Marek Vasut,

Quoted 5 lines · In message <[email protected]> you wrote:
---
 board/colibri_pxa270/colibri_pxa270.c |    1 +
 board/vpac270/vpac270.c               |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I believe you find life such a problem because you  think  there  are
the  good  people  and the bad people. You're wrong, of course. There
are, always and only, the bad people, but some of them are  on  oppo-
site sides.                      - Terry Pratchett, _Guards! Guards!_
#3 lore raw

PATCH 3/3 PXA: Declare __io for vpac270 IDE

In reply to Marek Vasut
---
 include/configs/vpac270.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/vpac270.h +2 -0
index 6d02995..d3e22d9 100644
@@ -228,6 +228,8 @@
 #undef	CONFIG_IDE_LED
 #undef	CONFIG_IDE_RESET
 
+#define	__io
+
 #define CONFIG_SYS_IDE_MAXBUS		1
 #define CONFIG_SYS_IDE_MAXDEVICE	1
 
Signature · 1 line
1.7.1
#4 lore raw

PATCH 3/3 PXA: Declare __io for vpac270 IDE

Dear Marek Vasut,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 include/configs/vpac270.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is dangerous to be sincere unless you are also stupid.
                                                - George Bernard Shaw
#5 lore raw

PATCH v2 1/3 PXA: Fix off-the-tree build problems

In reply to Marek Vasut

Dear Marek Vasut,

Quoted 9 lines · In message <[email protected]> you wrote:

---
V2:
Add missing $(obj) before .depend in the following line:
rm -f $(LIB) core *.bak $(obj).depend

 board/colibri_pxa270/Makefile |   20 ++++++++++++--------
 board/vpac270/Makefile        |   20 ++++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All these theories, diverse as they are, have two things  in  common:
they explain the observed facts, and they are completeley and utterly
wrong.                       - Terry Pratchett, _The Light Fantastic_