|
|
@@ -0,0 +1,64 @@
|
|
|
+From c3154899776586c291dd9bc6369d7091efac19ff Mon Sep 17 00:00:00 2001
|
|
|
+From: Kas User <kas@example.com>
|
|
|
+Date: Mon, 14 May 2018 10:25:49 +0200
|
|
|
+Subject: [PATCH] Fix for OE
|
|
|
+
|
|
|
+Signed-off-by: Kas User <kas@example.com>
|
|
|
+---
|
|
|
+ Makefile | 2 +-
|
|
|
+ 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
|
|
|
+ lib: src/lfs.so
|
|
|
+
|
|
|
+ src/lfs.so: $(OBJS)
|
|
|
+- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(LIB_OPTION) -o src/lfs.so $(OBJS)
|
|
|
++ MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(LIB_OPTION) ${LDFLAGS} -o src/lfs.so $(OBJS)
|
|
|
+
|
|
|
+ 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 @@
|
|
|
+ # Installation directories
|
|
|
+
|
|
|
+ # Default installation prefix
|
|
|
+-PREFIX=/usr/local
|
|
|
++PREFIX ?= /usr/local
|
|
|
+
|
|
|
+ # 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 includes directory
|
|
|
+ LUA_INC += -I$(PREFIX)/include
|
|
|
+ LUA_INC += -I/usr/include/lua5.1
|
|
|
++LUA_INC = `pkg-config --cflags lua`
|
|
|
+
|
|
|
+ # OS dependent
|
|
|
+-LIB_OPTION= -shared #for Linux
|
|
|
++LIB_OPTION= -shared ${LDFLAGS} #for Linux
|
|
|
+ #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
|
|
|
+
|
|
|
+ LIBNAME= $T.so.$V
|
|
|
+
|
|
|
+ # Compilation directives
|
|
|
+-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
|
|
|
+-INCS= $(LUA_INC)
|
|
|
+-CFLAGS= $(WARN) $(INCS)
|
|
|
+-CC= gcc
|
|
|
++WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
|
|
|
++CFLAGS += $(WARN) $(INCS) ${LUA_INC}
|
|
|
+
|
|
|
+ # $Id: config,v 1.21 2007/10/27 22:42:32 carregal Exp $
|
|
|
+--
|
|
|
+2.7.4
|
|
|
+
|