diff options
author | David Walter Seikel | 2014-04-21 20:41:26 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-21 20:41:26 +1000 |
commit | aae73e4dfa340f3ca0239dce92f1b564518ad834 (patch) | |
tree | 0550a5e077bff32f78137b46810f7b7627c5c662 | |
parent | Use rpath to tell programs where to find our libraries. (diff) | |
download | SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.zip SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.tar.gz SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.tar.bz2 SledjHamr-aae73e4dfa340f3ca0239dce92f1b564518ad834.tar.xz |
Shift libGuiLua.so to the libraries directory.
-rw-r--r-- | ClientHamr/GuiLua/GuiLua.c | 2 | ||||
-rwxr-xr-x | ClientHamr/GuiLua/build.lua | 4 | ||||
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 3 |
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'. | |||
359 | Normally luaL_register() creates a table of functions, that is the table | 359 | Normally luaL_register() creates a table of functions, that is the table |
360 | returned, but we want to do something different with skang. | 360 | returned, but we want to do something different with skang. |
361 | */ | 361 | */ |
362 | int luaopen_libGuiLua(lua_State *L) | 362 | int 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 | ||
16 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | 16 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS |
17 | 17 | ||
18 | removeFiles(dir, {'test_c.so', 'GuiLua.o', 'libGuiLua.so', 'skang'}) | 18 | removeFiles(dir, {'test_c.so', 'GuiLua.o', '../../libraries/libGuiLua.so', 'skang'}) |
19 | 19 | ||
20 | runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c') | 20 | runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c') |
21 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c') | 21 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c') |
22 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o libGuiLua.so GuiLua.o') | 22 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o ../../libraries/libGuiLua.so GuiLua.o') |
23 | runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o skang skang.c ' .. LDFLAGS .. ' -lGuiLua ' .. libs) | 23 | runCommand('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. |
1013 | local GuiLua = require 'libGuiLua' | 1013 | package.cpath = package.cpath .. ';../../libraries/lib?.so' |
1014 | local GuiLua = require 'GuiLua' | ||
1014 | 1015 | ||
1015 | 1016 | ||
1016 | thingasm('module,l', 'Load a module.', module, 'file') | 1017 | thingasm('module,l', 'Load a module.', module, 'file') |