summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/iw/iw
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-08-28 13:23:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-01 11:43:57 +0100
commit464f4e2079e478b6f27351b1254aca49c6882990 (patch)
tree507a332cc13a6425810633d6d239e362e9ecfc2d /meta/recipes-connectivity/iw/iw
parentfbb8b53730689e14d0c8df7ae4ecd4837a1f9821 (diff)
downloadpoky-464f4e2079e478b6f27351b1254aca49c6882990.tar.gz
iw: support and enable separate build dir
(From OE-Core rev: bc5401009332eb639d73fa4cbba217ff6899c787) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/iw/iw')
-rw-r--r--meta/recipes-connectivity/iw/iw/separate-objdir.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/iw/iw/separate-objdir.patch b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
new file mode 100644
index 0000000000..883f8b2c60
--- /dev/null
+++ b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
@@ -0,0 +1,57 @@
1From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Wed, 26 Aug 2015 17:23:48 -0700
4Subject: [PATCH] Support separation of SRCDIR and OBJDIR
5
6Typical use of VPATH to locate the sources.
7
8Upstream-Status: Pending
9
10Signed-off-by: Christopher Larson <chris_larson@mentor.com>
11
12---
13 Makefile | 7 +++++--
14 version.sh | 2 +-
15 2 files changed, 6 insertions(+), 3 deletions(-)
16
17diff --git a/Makefile b/Makefile
18index 548591a..da8d33a 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -1,5 +1,8 @@
22 MAKEFLAGS += --no-print-directory
23
24+SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
25+OBJDIR ?= $(PWD)
26+VPATH = $(SRCDIR)
27 PREFIX ?= /usr
28 SBINDIR ?= $(PREFIX)/sbin
29 MANDIR ?= $(PREFIX)/share/man
30@@ -95,11 +98,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))
31 version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
32 $(wildcard .git/index .git/refs/tags)
33 @$(NQ) ' GEN ' $@
34- $(Q)./version.sh $@
35+ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@
36
37 %.o: %.c iw.h nl80211.h
38 @$(NQ) ' CC ' $@
39- $(Q)$(CC) $(CFLAGS) -c -o $@ $<
40+ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $<
41
42 ifeq ($(IW_ANDROID_BUILD),)
43 iw: $(OBJS)
44diff --git a/version.sh b/version.sh
45index 5354383..fa954cf 100755
46--- a/version.sh
47+++ b/version.sh
48@@ -5,5 +5,5 @@ OUT="$1"
49
50 v="$VERSION"
51
52-echo '#include "iw.h"' > "$OUT"
53+echo '#include <iw.h>' > "$OUT"
54 echo "const char iw_version[] = \"$v\";" >> "$OUT"
55--
562.2.1
57