summaryrefslogtreecommitdiffstats
path: root/package/openzwave/0001-Fix-compilation-of-MinOZW.patch
blob: 773672e0ba2546ca96c637e6d19a7ca87c861fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 599e2a11c6f48dde744012ec45686c08e15f3059 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fabrice.fontaine@orange.com>
Date: Mon, 3 Oct 2016 10:35:52 +0200
Subject: [PATCH] Fix compilation of MinOZW (#991)

LIBDIR was used in cpp/examples/MinOZW/Makefile to add dynamic
libraries. However, as it was unset by default, the cross-compilation
could fail if the host had a library such as libnss3.so in /.
To fix this issue, this patch sets LIBDIR to top_buildir if it is unset

Fixes:
  http://autobuild.buildroot.net/results/68719fdf1320a69310bada6d3c47654dacdb5898

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
[Upstream commit: https://github.com/OpenZWave/open-zwave/commit/599e2a11c6f48dde744012ec45686c08e15f3059]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 cpp/examples/MinOZW/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile
index e575632a3..95d684b77 100644
--- a/cpp/examples/MinOZW/Makefile
+++ b/cpp/examples/MinOZW/Makefile
@@ -17,9 +17,11 @@ DEBUG_LDFLAGS	:= -g
 
 top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../../)
 
+#where is put the temporary library
+LIBDIR  	?= $(top_builddir)
 
 INCLUDES	:= -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/
-LIBS =  $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/*.so $(top_builddir)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )
+LIBS =  $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )
 LIBSDIR = $(abspath $(dir $(firstword $(LIBS))))
 minozwsrc := $(notdir $(wildcard $(top_srcdir)/cpp/examples/MinOZW/*.cpp))
 VPATH := $(top_srcdir)/cpp/examples/MinOZW
OpenPOWER on IntegriCloud