Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
28
Src/external_dependencies/openmpt-trunk/include/premake/binmodules/example/main.c
vendored
Normal file
28
Src/external_dependencies/openmpt-trunk/include/premake/binmodules/example/main.c
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "luashim.h"
|
||||
|
||||
|
||||
static int example_test(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "hello ");
|
||||
lua_pushvalue(L, 1);
|
||||
lua_concat(L, 2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static const luaL_Reg example_functions[] = {
|
||||
{ "test", example_test },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport) int luaopen_example(lua_State *L)
|
||||
#else
|
||||
int luaopen_example(lua_State *L)
|
||||
#endif
|
||||
{
|
||||
shimInitialize(L);
|
||||
luaL_register(L, "example", example_functions);
|
||||
return 0;
|
||||
}
|
28
Src/external_dependencies/openmpt-trunk/include/premake/binmodules/example/premake5.lua
vendored
Normal file
28
Src/external_dependencies/openmpt-trunk/include/premake/binmodules/example/premake5.lua
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
project "example"
|
||||
language "C"
|
||||
kind "SharedLib"
|
||||
warnings "extra"
|
||||
|
||||
includedirs {
|
||||
"../../contrib/lua/src",
|
||||
"../../contrib/luashim"
|
||||
}
|
||||
|
||||
links { 'luashim-lib' }
|
||||
|
||||
files
|
||||
{
|
||||
"*.c",
|
||||
"*.lua"
|
||||
}
|
||||
|
||||
filter "system:not windows"
|
||||
targetprefix ""
|
||||
targetextension ".so"
|
||||
pic "on"
|
||||
|
||||
filter "configurations:Release"
|
||||
targetdir "../../bin/release"
|
||||
|
||||
filter "configurations:Debug"
|
||||
targetdir "../../bin/debug"
|
Loading…
Add table
Add a link
Reference in a new issue