Skip to content

Commit

Permalink
Fix compilation of MinOZW (#991)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ffontaine authored and Fishwaldo committed Oct 3, 2016
1 parent 691d1f1 commit 599e2a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpp/examples/MinOZW/Makefile
Expand Up @@ -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
Expand Down

0 comments on commit 599e2a1

Please sign in to comment.