1From 097a2b259cb266c2c861dc74fa6f80712d6138c5 Mon Sep 17 00:00:00 2001
2From: Venture Research <tech@ventureresearch.com>
3Date: Fri, 8 Feb 2013 20:22:19 -0600
4Subject: [PATCH] lua: update Makefile to use environment build settings
5
6OE-specific parameters, instead of overriding all of these simply use
7the ones that are already passed in. Also configure for only Linux...
8
9Signed-off-by: Venture Research <tech@ventureresearch.com>
10
11Updated to work with 3.0.x
12
13Signed-off-by: Armin Kuster <akust808@gmail.com>
14
15updated to work wtih 6.2.1
16Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
17---
18 deps/Makefile         |  1 -
19 deps/lua/Makefile     |  1 -
20 deps/lua/src/Makefile | 16 ++++++----------
21 3 files changed, 6 insertions(+), 12 deletions(-)
22
23diff --git a/deps/Makefile b/deps/Makefile
24index ff16ee9..d8d64aa 100644
25--- a/deps/Makefile
26+++ b/deps/Makefile
27@@ -74,7 +74,6 @@ LUA_LDFLAGS+= $(LDFLAGS)
28 # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more
29 # challenging to cross-compile lua (and redis).  These defines make it easier
30 # to fit redis into cross-compilation environments, which typically set AR.
31-AR=ar
32 ARFLAGS=rc
33
34 lua: .make-prerequisites
35diff --git a/deps/lua/Makefile b/deps/lua/Makefile
36index 209a132..72f4b2b 100644
37--- a/deps/lua/Makefile
38+++ b/deps/lua/Makefile
39@@ -33,7 +33,6 @@ INSTALL_DATA= $(INSTALL) -m 0644
40
41 # Utilities.
42 MKDIR= mkdir -p
43-RANLIB= ranlib
44
45 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
46
47diff --git a/deps/lua/src/Makefile b/deps/lua/src/Makefile
48index f3bba2f..1555ec0 100644
49--- a/deps/lua/src/Makefile
50+++ b/deps/lua/src/Makefile
51@@ -5,18 +5,14 @@
52 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
53
54 # Your platform. See PLATS for possible values.
55-PLAT= none
56+PLAT= linux
57
58-CC?= gcc
59-CFLAGS= -O2 -Wall $(MYCFLAGS)
60-AR= ar rcu
61-RANLIB= ranlib
62-RM= rm -f
63-LIBS= -lm $(MYLIBS)
64-
65-MYCFLAGS=
66+MYCFLAGS=-DLUA_USE_LINUX
67 MYLDFLAGS=
68-MYLIBS=
69+MYLIBS=-Wl,-E -ldl -lreadline -lhistory -lncurses
70+
71+CFLAGS += $(MYCFLAGS)
72+LIBS += -lm $(MYLIBS)
73
74 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
75
76