OPENBUS-3112 Biblioteca do OiL passou a depender da luaiconv

(cherry picked from commit 1e975048)
parent 9ac4fcf1
......@@ -15,6 +15,7 @@ LIBS:= \
luacothread \
luaidl \
oil \
luaiconv \
luavararg \
lfs \
luuid \
......@@ -32,6 +33,7 @@ INCLUDES+= . $(SRCLUADIR) \
$(LUACOTHREAD_HOME)/obj/$(TEC_UNAME) \
$(LUAIDL_HOME)/obj/$(TEC_UNAME) \
$(OIL_HOME)/obj/$(TEC_UNAME) \
$(LUAICONV_HOME)/include \
$(LUAVARARG_HOME)/src \
$(LUAFILESYSTEM_HOME)/include \
$(LUUID_HOME)/include \
......@@ -48,6 +50,7 @@ LDIR+= \
$(LUACOTHREAD_HOME)/lib/$(TEC_UNAME) \
$(LUAIDL_HOME)/lib/$(TEC_UNAME) \
$(OIL_HOME)/lib/$(TEC_UNAME) \
$(LUAICONV_HOME)/lib/$(TEC_UNAME) \
$(LUAVARARG_HOME)/lib/$(TEC_UNAME) \
$(LUAFILESYSTEM_HOME)/lib/$(TEC_UNAME) \
$(LUUID_HOME)/lib/$(TEC_UNAME) \
......@@ -75,21 +78,25 @@ ifeq "$(TEC_SYSNAME)" "SunOS"
LFLAGS= $(CFLAGS) -xildoff
endif
ifdef USE_STATIC
ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
ifdef USE_STATIC
SLIB:= $(foreach libname, $(LIBS) uuid crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
ifeq "$(TEC_SYSNAME)" "SunOS"
LIBS:= rt nsl socket resolv
else
LIBS:=
endif
else
ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
ifneq "$(TEC_SYSNAME)" "Darwin"
else
ifeq ($(findstring $(TEC_SYSNAME), MacOS, Darwin), )
LIBS+= uuid
endif
endif
endif
ifneq ($(findstring $(TEC_SYSNAME), MacOS, Darwin), )
LIBS+= iconv
endif
ifneq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
APPTYPE= console
LIBS+= wsock32 rpcrt4
......
......@@ -17,6 +17,7 @@
#include "lauxlib.h"
#include "lualib.h"
#include "luaiconv.h"
#include "luuid.h"
#include "lfs.h"
#include "lce.h"
......@@ -495,6 +496,7 @@ static int pmain (lua_State *L) {
/* preload binded C libraries */
luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD");
lua_pushcfunction(L,luaopen_iconv);lua_setfield(L,-2,"iconv");
lua_pushcfunction(L,luaopen_uuid);lua_setfield(L,-2,"uuid");
lua_pushcfunction(L,luaopen_lfs);lua_setfield(L,-2,"lfs");
lua_pushcfunction(L,luaopen_vararg);lua_setfield(L,-2,"vararg");
......
Markdown is supported
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