Move luasocket from being a static lib to a binary module

This commit is contained in:
Emilio López 2018-03-30 12:37:25 +01:00
parent 09dbeff23f
commit 51aae62dcb
191 changed files with 76 additions and 60 deletions

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,15 @@
#include <luashim.h>
int luaopen_socket_core(lua_State *L);
#ifdef _WIN32
__declspec(dllexport) int luaopen_luasocket(lua_State *L)
#else
int luaopen_luasocket(lua_State *L)
#endif
{
shimInitialize(L);
luaL_requiref(L, "socket", luaopen_socket_core, 1);
lua_pop(L, 1);
return 0;
}

View File

@ -0,0 +1,50 @@
project "luasocket"
language "C"
kind "SharedLib"
warnings "extra"
includedirs
{
"../../contrib/lua/src",
"../../contrib/luashim"
}
links { 'luashim-lib' }
files
{
"src/*.c",
"src/*.h",
"src/*.lua",
"*.c"
}
filter "system:windows"
removefiles
{
"src/serial.c",
"src/unixdgram.*",
"src/unixstream.*",
"src/unix.*",
"src/usocket.*",
}
links { 'ws2_32' }
defines { "LUASOCKET_API=__declspec(dllexport)" }
filter "system:not windows"
removefiles
{
"src/wsocket.*",
}
pic "on"
defines { "LUASOCKET_API=__attribute__((visibility(\"default\")))" }
filter "configurations:Release"
targetdir "../../bin/release"
filter "configurations:Debug"
targetdir "../../bin/debug"

Some files were not shown because too many files have changed in this diff Show More