<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 27 August 2015 at 21:48, Christopher Larson <span dir="ltr">&lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
<br>
Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
---<br>
 .../iw/iw/separate-objdir.patch                    | 55 ++++++++++++++++++++++<br>
 meta/recipes-connectivity/iw/<a href="http://iw_4.1.bb" rel="noreferrer" target="_blank">iw_4.1.bb</a>             |  4 ++<br>
 2 files changed, 59 insertions(+)<br>
 create mode 100644 meta/recipes-connectivity/iw/iw/separate-objdir.patch<br>
<br>
diff --git a/meta/recipes-connectivity/iw/iw/separate-objdir.patch b/meta/recipes-connectivity/iw/iw/separate-objdir.patch<br>
new file mode 100644<br>
index 0000000..e29e461<br>
--- /dev/null<br>
+++ b/meta/recipes-connectivity/iw/iw/separate-objdir.patch<br>
@@ -0,0 +1,55 @@<br>
+From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001<br>
+From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
+Date: Wed, 26 Aug 2015 17:23:48 -0700<br>
+Subject: [PATCH] Support separation of SRCDIR and OBJDIR<br>
+<br>
+Typical use of VPATH to locate the sources.<br>
+<br>
+Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
+<br></blockquote><div><br></div><div>Upstream-Status ?</div><div> </div><div> - Jussi</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+---<br>
+ Makefile   | 7 +++++--<br>
+ version.sh | 2 +-<br>
+ 2 files changed, 6 insertions(+), 3 deletions(-)<br>
+<br>
+diff --git a/Makefile b/Makefile<br>
+index 548591a..da8d33a 100644<br>
+--- a/Makefile<br>
++++ b/Makefile<br>
+@@ -1,5 +1,8 @@<br>
+ MAKEFLAGS += --no-print-directory<br>
+<br>
++SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))<br>
++OBJDIR ?= $(PWD)<br>
++VPATH = $(SRCDIR)<br>
+ PREFIX ?= /usr<br>
+ SBINDIR ?= $(PREFIX)/sbin<br>
+ MANDIR ?= $(PREFIX)/share/man<br>
+@@ -95,11 +98,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))<br>
+ version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \<br>
+               $(wildcard .git/index .git/refs/tags)<br>
+       @$(NQ) &#39; GEN &#39; $@<br>
+-      $(Q)./version.sh $@<br>
++      $(Q)cd $(SRCDIR) &amp;&amp; ./version.sh $(OBJDIR)/$@<br>
+<br>
+ %.o: %.c iw.h nl80211.h<br>
+       @$(NQ) &#39; CC  &#39; $@<br>
+-      $(Q)$(CC) $(CFLAGS) -c -o $@ $&lt;<br>
++      $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $&lt;<br>
+<br>
+ ifeq ($(IW_ANDROID_BUILD),)<br>
+ iw:   $(OBJS)<br>
+diff --git a/version.sh b/version.sh<br>
+index 5354383..fa954cf 100755<br>
+--- a/version.sh<br>
++++ b/version.sh<br>
+@@ -5,5 +5,5 @@ OUT=&quot;$1&quot;<br>
+<br>
+ v=&quot;$VERSION&quot;<br>
+<br>
+-echo &#39;#include &quot;iw.h&quot;&#39; &gt; &quot;$OUT&quot;<br>
++echo &#39;#include &lt;iw.h&gt;&#39; &gt; &quot;$OUT&quot;<br>
+ echo &quot;const char iw_version[] = \&quot;$v\&quot;;&quot; &gt;&gt; &quot;$OUT&quot;<br>
+--<br>
+2.2.1<br>
+<br>
diff --git a/meta/recipes-connectivity/iw/<a href="http://iw_4.1.bb" rel="noreferrer" target="_blank">iw_4.1.bb</a> b/meta/recipes-connectivity/iw/<a href="http://iw_4.1.bb" rel="noreferrer" target="_blank">iw_4.1.bb</a><br>
index 8e27862..fafb0e3 100644<br>
--- a/meta/recipes-connectivity/iw/<a href="http://iw_4.1.bb" rel="noreferrer" target="_blank">iw_4.1.bb</a><br>
+++ b/meta/recipes-connectivity/iw/<a href="http://iw_4.1.bb" rel="noreferrer" target="_blank">iw_4.1.bb</a><br>
@@ -11,6 +11,7 @@ DEPENDS = &quot;libnl&quot;<br>
<br>
 SRC_URI = &quot;<a href="http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz" rel="noreferrer" target="_blank">http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz</a> \<br>
            file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \<br>
+           file://separate-objdir.patch \<br>
 &quot;<br>
<br>
 SRC_URI[md5sum] = &quot;68c282285c71c956069957e9ca10a6a7&quot;<br>
@@ -19,10 +20,13 @@ SRC_URI[sha256sum] = &quot;14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9<br>
 inherit pkgconfig<br>
<br>
 EXTRA_OEMAKE = &quot;\<br>
+    -f &#39;${S}/Makefile&#39; \<br>
+    \<br>
     &#39;PREFIX=${prefix}&#39; \<br>
     &#39;SBINDIR=${sbindir}&#39; \<br>
     &#39;MANDIR=${mandir}&#39; \<br>
 &quot;<br>
+B = &quot;${WORKDIR}/build&quot;<br>
<br>
 do_install() {<br>
     oe_runmake &#39;DESTDIR=${D}&#39; install<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.2.1<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br></div></div>