aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-21 20:41:26 +1000
committerDavid Walter Seikel2014-04-21 20:41:26 +1000
commitaae73e4dfa340f3ca0239dce92f1b564518ad834 (patch)
tree0550a5e077bff32f78137b46810f7b7627c5c662 /ClientHamr
parentUse rpath to tell programs where to find our libraries. (diff)
downloadSledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.zip
SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.tar.gz
SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.tar.bz2
SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.tar.xz
Shift libGuiLua.so to the libraries directory.
Diffstat (limited to 'ClientHamr')
-rw-r--r--ClientHamr/GuiLua/GuiLua.c2
-rwxr-xr-xClientHamr/GuiLua/build.lua4
-rw-r--r--ClientHamr/GuiLua/skang.lua3
3 files changed, 5 insertions, 4 deletions
diff --git a/ClientHamr/GuiLua/GuiLua.c b/ClientHamr/GuiLua/GuiLua.c
index 1e6d3fa..c7a368c 100644
--- a/ClientHamr/GuiLua/GuiLua.c
+++ b/ClientHamr/GuiLua/GuiLua.c
@@ -359,7 +359,7 @@ be 'libGuiLua'.
359Normally luaL_register() creates a table of functions, that is the table 359Normally luaL_register() creates a table of functions, that is the table
360returned, but we want to do something different with skang. 360returned, but we want to do something different with skang.
361*/ 361*/
362int luaopen_libGuiLua(lua_State *L) 362int luaopen_GuiLua(lua_State *L)
363{ 363{
364 int skang; 364 int skang;
365 365
diff --git a/ClientHamr/GuiLua/build.lua b/ClientHamr/GuiLua/build.lua
index 46a4cc5..7e1da15 100755
--- a/ClientHamr/GuiLua/build.lua
+++ b/ClientHamr/GuiLua/build.lua
@@ -15,9 +15,9 @@ end
15 15
16LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS 16LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS
17 17
18removeFiles(dir, {'test_c.so', 'GuiLua.o', 'libGuiLua.so', 'skang'}) 18removeFiles(dir, {'test_c.so', 'GuiLua.o', '../../libraries/libGuiLua.so', 'skang'})
19 19
20runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c') 20runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c')
21runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c') 21runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c')
22runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o libGuiLua.so GuiLua.o') 22runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o ../../libraries/libGuiLua.so GuiLua.o')
23runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o skang skang.c ' .. LDFLAGS .. ' -lGuiLua ' .. libs) 23runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o skang skang.c ' .. LDFLAGS .. ' -lGuiLua ' .. libs)
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index 6e22b3d..23549c3 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -1010,7 +1010,8 @@ end
1010 1010
1011-- Get our C functions installed into skang. 1011-- Get our C functions installed into skang.
1012-- This has to be after thingasm is defined. 1012-- This has to be after thingasm is defined.
1013local GuiLua = require 'libGuiLua' 1013package.cpath = package.cpath .. ';../../libraries/lib?.so'
1014local GuiLua = require 'GuiLua'
1014 1015
1015 1016
1016thingasm('module,l', 'Load a module.', module, 'file') 1017thingasm('module,l', 'Load a module.', module, 'file')