Commit add63fac authored by Khem Raj's avatar Khem Raj Committed by Stefano Babic
Browse files

luafilesystem: Fix multilib build



Do not hardcode /lib instead add an option to override it from env
Signed-off-by: default avatarKhem Raj <raj.khem@gmail.com>
parent 7f7ebbc7
......@@ -9,8 +9,6 @@ Signed-off-by: Kas User <kas@example.com>
config | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index dfc1a8a..a521db7 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ OBJS= src/$T.o
......@@ -22,8 +20,6 @@ index dfc1a8a..a521db7 100644
test: lib
LUA_CPATH=./src/?.so lua tests/test.lua
diff --git a/config b/config
index 2fc9a78..fd73f4a 100644
--- a/config
+++ b/config
@@ -1,25 +1,25 @@
......@@ -31,12 +27,13 @@ index 2fc9a78..fd73f4a 100644
# Default installation prefix
-PREFIX=/usr/local
-
+PREFIX ?= /usr/local
+BASELIB ?= /lib
# System's libraries directory (where binary libraries are installed)
-LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
+LUAVER ?= `pkg-config --modversion lua | cut -d'.' -f1,2`
+LUA_LIBDIR = $(PREFIX)/lib/lua/$(LUAVER)
+LUA_LIBDIR = $(PREFIX)$(BASELIB)/lua/$(LUAVER)
# Lua includes directory
LUA_INC += -I$(PREFIX)/include
......@@ -59,6 +56,3 @@ index 2fc9a78..fd73f4a 100644
+CFLAGS += $(WARN) $(INCS) ${LUA_INC}
# $Id: config,v 1.21 2007/10/27 22:42:32 carregal Exp $
--
2.7.4
......@@ -15,7 +15,7 @@ inherit pkgconfig
S = "${WORKDIR}/git"
EXTRA_OEMAKE = 'PREFIX=${D}/usr CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} -fpic" LDFLAGS="${LDFLAGS}"'
EXTRA_OEMAKE = 'PREFIX=${D}/usr BASELIB=${base_libdir} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} -fpic" LDFLAGS="${LDFLAGS}"'
# NOTE: this is a Makefile-only piece of software, so we cannot generate much of the
# recipe automatically - you will need to examine the Makefile yourself and ensure
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment