OPENBUS-3112 Biblioteca do OiL passou a depender da luaiconv

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