<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 27 August 2015 at 21:48, Christopher Larson <span dir="ltr"><<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
<br>
Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><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 <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><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 <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><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) ' GEN ' $@<br>
+- $(Q)./version.sh $@<br>
++ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@<br>
+<br>
+ %.o: %.c iw.h nl80211.h<br>
+ @$(NQ) ' CC ' $@<br>
+- $(Q)$(CC) $(CFLAGS) -c -o $@ $<<br>
++ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $<<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="$1"<br>
+<br>
+ v="$VERSION"<br>
+<br>
+-echo '#include "iw.h"' > "$OUT"<br>
++echo '#include <iw.h>' > "$OUT"<br>
+ echo "const char iw_version[] = \"$v\";" >> "$OUT"<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 = "libnl"<br>
<br>
SRC_URI = "<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>
"<br>
<br>
SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7"<br>
@@ -19,10 +20,13 @@ SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9<br>
inherit pkgconfig<br>
<br>
EXTRA_OEMAKE = "\<br>
+ -f '${S}/Makefile' \<br>
+ \<br>
'PREFIX=${prefix}' \<br>
'SBINDIR=${sbindir}' \<br>
'MANDIR=${mandir}' \<br>
"<br>
+B = "${WORKDIR}/build"<br>
<br>
do_install() {<br>
oe_runmake 'DESTDIR=${D}' 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>