mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-27 12:30:34 -09:00
lua: choice between 5.1.x & 5.2.x
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
93341046d8
commit
ba296ab1ea
@@ -4,7 +4,11 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUA_5_2),y)
|
||||
LUA_VERSION = 5.2.3
|
||||
else
|
||||
LUA_VERSION = 5.1.5
|
||||
endif
|
||||
LUA_SITE = http://www.lua.org/ftp
|
||||
LUA_INSTALL_STAGING = YES
|
||||
LUA_LICENSE = MIT
|
||||
@@ -13,6 +17,13 @@ LUA_LICENSE_FILES = COPYRIGHT
|
||||
LUA_CFLAGS = -Wall -fPIC
|
||||
LUA_MYLIBS += -ldl
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUA_5_2),y)
|
||||
LUA_CFLAGS += -DLUA_COMPAT_ALL
|
||||
ifneq ($(BR2_LARGEFILE),y)
|
||||
LUA_CFLAGS += -D_FILE_OFFSET_BITS=32
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y)
|
||||
LUA_DEPENDENCIES = readline ncurses
|
||||
LUA_MYLIBS += -lreadline -lhistory -lncurses
|
||||
@@ -33,6 +44,10 @@ HOST_LUA_DEPENDENCIES =
|
||||
HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX
|
||||
HOST_LUA_MYLIBS = -ldl
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LUA_5_2),y)
|
||||
HOST_LUA_CFLAGS += -DLUA_COMPAT_ALL
|
||||
endif
|
||||
|
||||
define LUA_BUILD_CMDS
|
||||
$(MAKE) \
|
||||
CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \
|
||||
@@ -70,7 +85,8 @@ define LUA_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \
|
||||
$(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
|
||||
ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so
|
||||
$(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a
|
||||
mkdir -p $(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)
|
||||
mkdir -p $(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)
|
||||
endef
|
||||
|
||||
define HOST_LUA_INSTALL_CMDS
|
||||
|
||||
Reference in New Issue
Block a user