diff options
-rw-r--r-- | meta/recipes-connectivity/iw/iw/separate-objdir.patch | 57 | ||||
-rw-r--r-- | meta/recipes-connectivity/iw/iw_4.1.bb | 4 |
2 files changed, 61 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 @@ | |||
1 | From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christopher Larson <chris_larson@mentor.com> | ||
3 | Date: Wed, 26 Aug 2015 17:23:48 -0700 | ||
4 | Subject: [PATCH] Support separation of SRCDIR and OBJDIR | ||
5 | |||
6 | Typical use of VPATH to locate the sources. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-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 | |||
17 | diff --git a/Makefile b/Makefile | ||
18 | index 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) | ||
44 | diff --git a/version.sh b/version.sh | ||
45 | index 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 | -- | ||
56 | 2.2.1 | ||
57 | |||
diff --git a/meta/recipes-connectivity/iw/iw_4.1.bb b/meta/recipes-connectivity/iw/iw_4.1.bb index 8e278621e6..fafb0e3c9e 100644 --- a/meta/recipes-connectivity/iw/iw_4.1.bb +++ b/meta/recipes-connectivity/iw/iw_4.1.bb | |||
@@ -11,6 +11,7 @@ DEPENDS = "libnl" | |||
11 | 11 | ||
12 | SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ | 12 | SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ |
13 | file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ | 13 | file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ |
14 | file://separate-objdir.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7" | 17 | SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7" |
@@ -19,10 +20,13 @@ SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9 | |||
19 | inherit pkgconfig | 20 | inherit pkgconfig |
20 | 21 | ||
21 | EXTRA_OEMAKE = "\ | 22 | EXTRA_OEMAKE = "\ |
23 | -f '${S}/Makefile' \ | ||
24 | \ | ||
22 | 'PREFIX=${prefix}' \ | 25 | 'PREFIX=${prefix}' \ |
23 | 'SBINDIR=${sbindir}' \ | 26 | 'SBINDIR=${sbindir}' \ |
24 | 'MANDIR=${mandir}' \ | 27 | 'MANDIR=${mandir}' \ |
25 | " | 28 | " |
29 | B = "${WORKDIR}/build" | ||
26 | 30 | ||
27 | do_install() { | 31 | do_install() { |
28 | oe_runmake 'DESTDIR=${D}' install | 32 | oe_runmake 'DESTDIR=${D}' install |