diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | TODO | 46 | ||||
-rwxr-xr-x | build.lua | 16 | ||||
-rw-r--r-- | docs/README.libraries | 6 | ||||
-rw-r--r-- | lib/LSL.lua (renamed from libraries/LSL.lua) | 0 | ||||
-rw-r--r-- | lib/skang.lua (renamed from libraries/skang.lua) | 2 | ||||
-rwxr-xr-x | libraries/build.lua | 24 | ||||
-rw-r--r-- | media/checkme.txt | 2 | ||||
-rw-r--r-- | src/GuiLua/GuiLua.h | 23 | ||||
-rwxr-xr-x | src/GuiLua/build.lua | 4 | ||||
-rw-r--r-- | src/GuiLua/skang.c | 6 | ||||
-rwxr-xr-x | src/GuiLua/test.sh | 2 | ||||
-rw-r--r-- | src/LuaSL/LuaSL_compile.c | 4 | ||||
-rw-r--r-- | src/LuaSL/LuaSL_test.c | 8 | ||||
-rwxr-xr-x | src/LuaSL/build.lua | 9 | ||||
-rwxr-xr-x | src/LuaSL/test.sh | 2 | ||||
-rw-r--r-- | src/extantz/extantz.c | 21 | ||||
-rw-r--r-- | src/extantz/extantz.h | 8 | ||||
-rw-r--r-- | src/libraries/LumbrJack.c (renamed from libraries/LumbrJack.c) | 0 | ||||
-rw-r--r-- | src/libraries/LumbrJack.h (renamed from libraries/LumbrJack.h) | 0 | ||||
-rw-r--r-- | src/libraries/Runnr.c (renamed from libraries/Runnr.c) | 0 | ||||
-rw-r--r-- | src/libraries/Runnr.h (renamed from libraries/Runnr.h) | 0 | ||||
-rw-r--r-- | src/libraries/SledjHamr.c | 23 | ||||
-rw-r--r-- | src/libraries/SledjHamr.h | 14 | ||||
-rwxr-xr-x | src/libraries/build.lua | 33 |
25 files changed, 123 insertions, 132 deletions
@@ -319,7 +319,7 @@ skang | |||
319 | *.lsl.lua | 319 | *.lsl.lua |
320 | *.lsl2 | 320 | *.lsl2 |
321 | libraries/lemon/lemon | 321 | libraries/lemon/lemon |
322 | libraries/constants.lsl | 322 | lib/constants.lsl |
323 | src/LuaSL/LuaSL_test | 323 | src/LuaSL/LuaSL_test |
324 | src/LuaSL/LuaSL_lemon_yaccer.c | 324 | src/LuaSL/LuaSL_lemon_yaccer.c |
325 | src/LuaSL/LuaSL_lemon_yaccer.h | 325 | src/LuaSL/LuaSL_lemon_yaccer.h |
@@ -3,45 +3,19 @@ FIXES - | |||
3 | Project paths | 3 | Project paths |
4 | ------------- | 4 | ------------- |
5 | 5 | ||
6 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. baseDir .. '\\"' | ||
7 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. baseDir .. '\\"' | ||
8 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. baseDir .. '\\"' | ||
9 | |||
10 | // There is also a locale variety, but we are not dealing with locale stuff yet. | ||
11 | // There is a prefix variety, but you can't set it, only read it later. | ||
12 | // These set the fallbacks used by elm_app_info_set(), that are defined at compile time. | ||
13 | elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); | ||
14 | elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); | ||
15 | elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); | ||
16 | // Do this after the above calls, but before changing the working directory, or screwing with argv[0]. | ||
17 | // It tries to set up the package paths depending on where the executable is, so things are relocatable. | ||
18 | // First argument is the elm_main() function that Elementary starts us from. | ||
19 | // Second argument should be a lower case string used as the "domain", which is different from the log domain. | ||
20 | // It's used lower case as part of the data directory path. | ||
21 | // So, if prefix is /usr/local, then the system data dir is /usr/local/share, | ||
22 | // and this apps data dir is /usr/local/share/"domain". | ||
23 | // It's used upper case as part of environment variables to override directory paths at run time. | ||
24 | // So "DOMAIN"_PREFIX, "DOMAIN"_BIN_DIR, "DOMAIN"_LIB_DIR, "DOMAIN"_DATA_DIR, and "DOMAIN"_LOCALE_DIR | ||
25 | // Third argument is the name of a file it can check for to make sure it found the correct path. | ||
26 | // This file is looked for in the data dir. | ||
27 | elm_app_info_set(elm_main, "GuiLua", "skang.lua"); | ||
28 | // Once this is all setup, the code can do - | ||
29 | elm_app_prefix_dir_get(); // or bin, lib, data, locale. | ||
30 | |||
31 | The executables currently live in ...../SledjHamr. | 6 | The executables currently live in ...../SledjHamr. |
32 | Test executables stay in the src directory. | 7 | Test executables stay in the src directory. |
33 | Media and other data in SledjHamr/media (includes the test sim and Irrlicht examples). | 8 | Media and other data in SledjHamr/media (includes the test sim and Irrlicht examples). |
34 | Libraries are in SledjHamr/libraries (including Irrlicht, lemon, and some sources). | 9 | External libraries are in SledjHamr/libraries (Irrlicht and lemon). |
35 | Should move LumbrJack and Runnr sources to src, and probably lemon to. | ||
36 | Irrlicht is statically linked, so except for it's media, we don't need it at run time. | 10 | Irrlicht is statically linked, so except for it's media, we don't need it at run time. |
37 | We could probably move the Irrlicht examples we actually use (all test data anyway) to Test sim. | 11 | We could probably move the Irrlicht examples we actually use (all test data anyway) to Test sim. |
12 | Lemon is only used at build time. | ||
38 | 13 | ||
39 | Builders should be able to - | 14 | Builders should be able to - |
40 | put binaries in /usr/local/bin | 15 | put binaries in /usr/local/bin |
41 | put libraries - /usr/local/lib/SledjHamr | 16 | put libraries - /usr/local/lib/SledjHamr |
42 | put media in /usr/local/share/SledjHamr | 17 | put media in /usr/local/share/SledjHamr |
43 | If they don't, those things should be in the build directory, where they are now. | 18 | If they don't, those things should be in the build directory, where they are now. |
44 | And looked up locally to allow moving it as one thing. | ||
45 | 19 | ||
46 | User should be able to - | 20 | User should be able to - |
47 | Run sims from where ever they like. | 21 | Run sims from where ever they like. |
@@ -53,12 +27,6 @@ User should be able to - | |||
53 | Write their own skins, using their own media. | 27 | Write their own skins, using their own media. |
54 | 28 | ||
55 | SOOOO ... | 29 | SOOOO ... |
56 | build.lua should set - | ||
57 | PACKAGE_BIN_DIR = SledjHamr | ||
58 | PACKAGE_LIB_DIR = SledjHamr/libraries (should rename this to lib) | ||
59 | PACKAGE_DATA_DIR = SledjHamr/media | ||
60 | PACKAGE_LOCALE_DIR = SledjHamr/locale (doesn't exist yet) | ||
61 | |||
62 | install.lua should - (doesn't exist yet) | 30 | install.lua should - (doesn't exist yet) |
63 | SledjHamr binaries -> prefix .. '/bin' | 31 | SledjHamr binaries -> prefix .. '/bin' |
64 | SledjHamr/libraries -> prefix .. '/lib/SledjHamr' | 32 | SledjHamr/libraries -> prefix .. '/lib/SledjHamr' |
@@ -69,14 +37,6 @@ SOOOO ... | |||
69 | For now, we don't care, there's no actual installing going on. | 37 | For now, we don't care, there's no actual installing going on. |
70 | SledjHamr/locale -> prefix .. '/share/SledjHamr/locale' | 38 | SledjHamr/locale -> prefix .. '/share/SledjHamr/locale' |
71 | 39 | ||
72 | Some library function should call all the elm_app_compile_*_dir_set() functions. | ||
73 | They should be set as -D options only for that library. | ||
74 | elm_app_info_set() has to be called for each different elm_main(), so that might be tricky. | ||
75 | elm_app_*_dir_get() can then be called from anywhere, and will get the same results. | ||
76 | NOTE - this is Elm specific, so non GUI stuff like LuaSL can't use it. | ||
77 | Seems that non Elm examples all just use the PACKAGE_*_DIR type macros directly in strings. | ||
78 | |||
79 | |||
80 | 40 | ||
81 | Irrlicht is flickering like crazy. Hmm, might be Irrlicht's fault, | 41 | Irrlicht is flickering like crazy. Hmm, might be Irrlicht's fault, |
82 | mostly it flickers to black, but I've seen it flicker to the first frame | 42 | mostly it flickers to black, but I've seen it flicker to the first frame |
@@ -118,7 +78,7 @@ Write my own, use ePhysics. Hopefully ePhysics has some sort of | |||
118 | magnetism / attraction thingy. See the forces demo, should be doable. | 78 | magnetism / attraction thingy. See the forces demo, should be doable. |
119 | Collision restraints and impulses? | 79 | Collision restraints and impulses? |
120 | 80 | ||
121 | See if Evas allows detaching stuff from one canvas and adding it to | 81 | See if Evas allows detaching stuff from one canvas and adding it to |
122 | another canvas. This allows things like tearing off tabs from windows, | 82 | another canvas. This allows things like tearing off tabs from windows, |
123 | tearing off sub menus, and switching windows between internal and | 83 | tearing off sub menus, and switching windows between internal and |
124 | external windows, without having to entirely recreate the UI stack | 84 | external windows, without having to entirely recreate the UI stack |
@@ -58,11 +58,16 @@ if 'number' == type(args) then | |||
58 | end | 58 | end |
59 | end | 59 | end |
60 | 60 | ||
61 | bin_d = baseDir | ||
62 | lib_d = baseDir .. '/lib' | ||
63 | data_d = baseDir .. '/media' | ||
64 | locale_d = baseDir .. '/locale' | ||
65 | |||
61 | -- Likely this will fail, coz Lua likes to strip out environmont variables. | 66 | -- Likely this will fail, coz Lua likes to strip out environmont variables. |
62 | -- On the other hand, there's a more direct way to get to environment variables, it would fail to. | 67 | -- On the other hand, there's a more direct way to get to environment variables, it would fail to. |
63 | CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') | 68 | CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') |
64 | 69 | ||
65 | CFLAGS = '-g -Wall -I include -I ' .. baseDir .. '/libraries' | 70 | CFLAGS = '-g -Wall -I ' .. baseDir .. '/src/libraries' |
66 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') | 71 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') |
67 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') | 72 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') |
68 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') | 73 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') |
@@ -71,13 +76,10 @@ CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-evas') | |||
71 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-file') | 76 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-file') |
72 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'edje') | 77 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'edje') |
73 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'elementary') | 78 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'elementary') |
74 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. baseDir .. '\\"' | ||
75 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. baseDir .. '\\"' | ||
76 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. baseDir .. '\\"' | ||
77 | CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS | 79 | CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS |
78 | 80 | ||
79 | LDFLAGS = '-L ' .. baseDir .. '/libraries ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L /usr/lib -L /lib' | 81 | LDFLAGS = '-L ' .. baseDir .. '/lib ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L /usr/lib -L /lib' |
80 | libs = '-lLumbrJack -lRunnr ' .. pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm -Wl,-rpath,' .. baseDir .. '/libraries' | 82 | libs = '-lLumbrJack -lRunnr -lSledjHamr ' .. pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm -Wl,-rpath,' .. baseDir .. '/lib' |
81 | LFLAGS = '-d' | 83 | LFLAGS = '-d' |
82 | EDJE_FLAGS = '-id ' .. baseDir .. '/media -fd ' .. baseDir .. '/media' | 84 | EDJE_FLAGS = '-id ' .. baseDir .. '/media -fd ' .. baseDir .. '/media' |
83 | 85 | ||
@@ -90,7 +92,7 @@ if 'nil' == type(args) then | |||
90 | print('_______________ BUILDING Irrlicht _______________') | 92 | print('_______________ BUILDING Irrlicht _______________') |
91 | -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. | 93 | -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. |
92 | runCommand('Irrlicht','libraries/irrlicht-1.8.1/source/Irrlicht', 'make') | 94 | runCommand('Irrlicht','libraries/irrlicht-1.8.1/source/Irrlicht', 'make') |
93 | buildSub('libraries', 'libraries') | 95 | buildSub('libraries', 'src/libraries') |
94 | buildSub('LuaSL', 'src/LuaSL') | 96 | buildSub('LuaSL', 'src/LuaSL') |
95 | buildSub('GuiLua', 'src/GuiLua') | 97 | buildSub('GuiLua', 'src/GuiLua') |
96 | buildSub('extantz', 'src/extantz') | 98 | buildSub('extantz', 'src/extantz') |
diff --git a/docs/README.libraries b/docs/README.libraries index a26fda1..6d36009 100644 --- a/docs/README.libraries +++ b/docs/README.libraries | |||
@@ -26,6 +26,8 @@ Merged it into LuaSL, so it's no longer here. | |||
26 | 26 | ||
27 | These are the libraries written for the SledjHamr project. | 27 | These are the libraries written for the SledjHamr project. |
28 | 28 | ||
29 | LumbrJack is a library of logging stuff, coz every one wants to log. | 29 | libLumbrJack is a library of logging stuff, coz every one wants to log. |
30 | 30 | ||
31 | Runnr is for running Lua scripts. Named (sorta) after a friend of mine. | 31 | libRunnr is for running Lua scripts. Named (sorta) after a friend of mine. |
32 | |||
33 | libSledjHamr is a motley collection of stuff that is needed. | ||
diff --git a/libraries/LSL.lua b/lib/LSL.lua index 662c880..662c880 100644 --- a/libraries/LSL.lua +++ b/lib/LSL.lua | |||
diff --git a/libraries/skang.lua b/lib/skang.lua index 23549c3..633a574 100644 --- a/libraries/skang.lua +++ b/lib/skang.lua | |||
@@ -1010,7 +1010,7 @@ 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 | package.cpath = package.cpath .. ';../../libraries/lib?.so' | 1013 | package.cpath = package.cpath .. ';../../lib/lib?.so' |
1014 | local GuiLua = require 'GuiLua' | 1014 | local GuiLua = require 'GuiLua' |
1015 | 1015 | ||
1016 | 1016 | ||
diff --git a/libraries/build.lua b/libraries/build.lua deleted file mode 100755 index 8b48b70..0000000 --- a/libraries/build.lua +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #!/usr/bin/env lua | ||
2 | |||
3 | local dir = ... | ||
4 | |||
5 | if 'nil' == type(dir) then | ||
6 | local build, err = loadfile('../build.lua') | ||
7 | if build then | ||
8 | setfenv(build, getfenv(2)) | ||
9 | build('') | ||
10 | else | ||
11 | print("ERROR - " .. err) | ||
12 | end | ||
13 | dir = workingDir | ||
14 | end | ||
15 | |||
16 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | ||
17 | |||
18 | removeFiles(dir, {'LumbrJack.o', 'libLumbrJack.so', 'Runnr.o', 'libRunnr.so'}) | ||
19 | |||
20 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c LumbrJack.c') | ||
21 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libLumbrJack.so -o libLumbrJack.so LumbrJack.o') | ||
22 | |||
23 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c Runnr.c') | ||
24 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libRunnr.so -o libRunnr.so Runnr.o') | ||
diff --git a/media/checkme.txt b/media/checkme.txt new file mode 100644 index 0000000..957099c --- /dev/null +++ b/media/checkme.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | A file for elm_app_info_set() to find, to make sure it found the correct | ||
2 | data directory. | ||
diff --git a/src/GuiLua/GuiLua.h b/src/GuiLua/GuiLua.h index 95353fb..2dd77ba 100644 --- a/src/GuiLua/GuiLua.h +++ b/src/GuiLua/GuiLua.h | |||
@@ -1,27 +1,8 @@ | |||
1 | 1 | #include "SledjHamr.h" | |
2 | #define EFL_API_OVERRIDE 1 | ||
3 | /* Enable access to unstable EFL API that are still in beta */ | ||
4 | #define EFL_BETA_API_SUPPORT 1 | ||
5 | /* Enable access to unstable EFL EO API. */ | ||
6 | #define EFL_EO_API_SUPPORT 1 | ||
7 | |||
8 | #include <stdio.h> | ||
9 | #include <ctype.h> | ||
10 | |||
11 | #include <Elementary.h> | ||
12 | |||
13 | // This got left out. | ||
14 | //EAPI Evas_3D_Scene *evas_3d_scene_add(Evas *e); | ||
15 | |||
16 | |||
17 | #include <lua.h> | ||
18 | #include <luajit.h> | ||
19 | #include <lualib.h> | ||
20 | #include <lauxlib.h> | ||
21 | |||
22 | #include "LumbrJack.h" | 2 | #include "LumbrJack.h" |
23 | #include "Runnr.h" | 3 | #include "Runnr.h" |
24 | 4 | ||
5 | |||
25 | typedef struct _globals globals; | 6 | typedef struct _globals globals; |
26 | 7 | ||
27 | 8 | ||
diff --git a/src/GuiLua/build.lua b/src/GuiLua/build.lua index 16f4153..169e198 100755 --- a/src/GuiLua/build.lua +++ b/src/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', '../../libraries/libGuiLua.so', '../../skang'}) | 18 | removeFiles(dir, {'test_c.so', 'GuiLua.o', lib_d .. '/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 ../../libraries/libGuiLua.so GuiLua.o') | 22 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o ' .. lib_d .. '/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/src/GuiLua/skang.c b/src/GuiLua/skang.c index facc239..f78c1c5 100644 --- a/src/GuiLua/skang.c +++ b/src/GuiLua/skang.c | |||
@@ -3,11 +3,7 @@ | |||
3 | 3 | ||
4 | EAPI_MAIN int elm_main(int argc, char **argv) | 4 | EAPI_MAIN int elm_main(int argc, char **argv) |
5 | { | 5 | { |
6 | elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); | 6 | HamrTime(elm_main, "GuiLua"); |
7 | elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); | ||
8 | elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); | ||
9 | elm_app_info_set(elm_main, "GuiLua", "skang.lua"); | ||
10 | |||
11 | GuiLuaDo(argc, argv); | 7 | GuiLuaDo(argc, argv); |
12 | 8 | ||
13 | return 0; | 9 | return 0; |
diff --git a/src/GuiLua/test.sh b/src/GuiLua/test.sh index bea2fc3..0cf39d9 100755 --- a/src/GuiLua/test.sh +++ b/src/GuiLua/test.sh | |||
@@ -2,5 +2,5 @@ | |||
2 | 2 | ||
3 | wd=$(pwd) | 3 | wd=$(pwd) |
4 | 4 | ||
5 | export LUA_PATH="$wd/../../libraries/?.lua;./?.lua" | 5 | export LUA_PATH="$wd/../../lib/?.lua;./?.lua" |
6 | ../../skang -l test -foo "argy bargy" | 6 | ../../skang -l test -foo "argy bargy" |
diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c index 771888e..f32e0c0 100644 --- a/src/LuaSL/LuaSL_compile.c +++ b/src/LuaSL/LuaSL_compile.c | |||
@@ -2119,9 +2119,9 @@ boolean compilerSetup(gameGlobals *ourGlobals) | |||
2119 | } | 2119 | } |
2120 | 2120 | ||
2121 | // Compile the constants. | 2121 | // Compile the constants. |
2122 | snprintf(buf, sizeof(buf), "lua -e 'require(\"LSL\").gimmeLSL()' > %s/libraries/constants.lsl", PACKAGE_DATA_DIR); | 2122 | snprintf(buf, sizeof(buf), "lua -e 'require(\"LSL\").gimmeLSL()' > %s/constants.lsl", PACKAGE_LIB_DIR); |
2123 | system(buf); | 2123 | system(buf); |
2124 | snprintf(buf, sizeof(buf), "%s/libraries/constants.lsl", PACKAGE_DATA_DIR); | 2124 | snprintf(buf, sizeof(buf), "%s/constants.lsl", PACKAGE_LIB_DIR); |
2125 | compileLSL(ourGlobals, NULL, "FAKE_SID", buf, TRUE); | 2125 | compileLSL(ourGlobals, NULL, "FAKE_SID", buf, TRUE); |
2126 | 2126 | ||
2127 | return TRUE; | 2127 | return TRUE; |
diff --git a/src/LuaSL/LuaSL_test.c b/src/LuaSL/LuaSL_test.c index 58d6225..27b9626 100644 --- a/src/LuaSL/LuaSL_test.c +++ b/src/LuaSL/LuaSL_test.c | |||
@@ -147,7 +147,7 @@ static Eina_Bool _add(void *data, int type __UNUSED__, Ecore_Con_Event_Server_Ad | |||
147 | 147 | ||
148 | ourGlobals->server = ev->server; | 148 | ourGlobals->server = ev->server; |
149 | gettimeofday(&startTime, NULL); | 149 | gettimeofday(&startTime, NULL); |
150 | snprintf(buf, sizeof(buf), "%s/media/Test sim/objects", PACKAGE_DATA_DIR); | 150 | snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR); |
151 | eina_file_dir_list(buf, EINA_TRUE, dirList_compile, ourGlobals); | 151 | eina_file_dir_list(buf, EINA_TRUE, dirList_compile, ourGlobals); |
152 | // Wait awhile, then start sending events for testing. | 152 | // Wait awhile, then start sending events for testing. |
153 | ecore_timer_add(0.5, _timer_cb, ourGlobals); | 153 | ecore_timer_add(0.5, _timer_cb, ourGlobals); |
@@ -392,7 +392,7 @@ int main(int argc, char **argv) | |||
392 | evas_object_focus_set(ourGlobals.bg, EINA_TRUE); | 392 | evas_object_focus_set(ourGlobals.bg, EINA_TRUE); |
393 | 393 | ||
394 | ourGlobals.edje = edje_object_add(ourGlobals.canvas); | 394 | ourGlobals.edje = edje_object_add(ourGlobals.canvas); |
395 | snprintf(buf, sizeof(buf), "%s/media/%s.edj", PACKAGE_DATA_DIR, "LuaSL"); | 395 | snprintf(buf, sizeof(buf), "%s/%s.edj", PACKAGE_DATA_DIR, "LuaSL"); |
396 | if (!edje_object_file_set(ourGlobals.edje, buf, group)) | 396 | if (!edje_object_file_set(ourGlobals.edje, buf, group)) |
397 | { | 397 | { |
398 | int err = edje_object_load_error_get(ourGlobals.edje); | 398 | int err = edje_object_load_error_get(ourGlobals.edje); |
@@ -409,7 +409,7 @@ int main(int argc, char **argv) | |||
409 | evas_object_resize(ourGlobals.edje, WIDTH, HEIGHT); | 409 | evas_object_resize(ourGlobals.edje, WIDTH, HEIGHT); |
410 | evas_object_show(ourGlobals.edje); | 410 | evas_object_show(ourGlobals.edje); |
411 | 411 | ||
412 | snprintf(buf, sizeof(buf), "%s/media/bubble_sh.png", PACKAGE_DATA_DIR); | 412 | snprintf(buf, sizeof(buf), "%s/bubble_sh.png", PACKAGE_DATA_DIR); |
413 | for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++) | 413 | for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++) |
414 | { | 414 | { |
415 | sh = evas_object_image_filled_add(ourGlobals.canvas); | 415 | sh = evas_object_image_filled_add(ourGlobals.canvas); |
@@ -419,7 +419,7 @@ int main(int argc, char **argv) | |||
419 | evas_object_data_set(ourGlobals.bg, names[(i * 2) + 1], sh); | 419 | evas_object_data_set(ourGlobals.bg, names[(i * 2) + 1], sh); |
420 | } | 420 | } |
421 | 421 | ||
422 | snprintf(buf, sizeof(buf), "%s/media/bubble.png", PACKAGE_DATA_DIR); | 422 | snprintf(buf, sizeof(buf), "%s/bubble.png", PACKAGE_DATA_DIR); |
423 | for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++) | 423 | for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++) |
424 | { | 424 | { |
425 | bub = evas_object_image_filled_add(ourGlobals.canvas); | 425 | bub = evas_object_image_filled_add(ourGlobals.canvas); |
diff --git a/src/LuaSL/build.lua b/src/LuaSL/build.lua index f86715c..6b34145 100755 --- a/src/LuaSL/build.lua +++ b/src/LuaSL/build.lua | |||
@@ -13,11 +13,20 @@ if 'nil' == type(dir) then | |||
13 | dir = workingDir | 13 | dir = workingDir |
14 | end | 14 | end |
15 | 15 | ||
16 | |||
16 | removeFiles(dir, {'../../LuaSL', '*.o', '*.output', '*.backup', '../../media/LuaSL.edj', 'LuaSL_lexer.h', 'LuaSL_lexer.c', 'LuaSL_lemon_yaccer.h', 'LuaSL_lemon_yaccer.c', 'LuaSL_lemon_yaccer.out'}) | 17 | removeFiles(dir, {'../../LuaSL', '*.o', '*.output', '*.backup', '../../media/LuaSL.edj', 'LuaSL_lexer.h', 'LuaSL_lexer.c', 'LuaSL_lemon_yaccer.h', 'LuaSL_lemon_yaccer.c', 'LuaSL_lemon_yaccer.out'}) |
17 | 18 | ||
18 | -- Run lemon first, flex depends on it to define the symbol values. | 19 | -- Run lemon first, flex depends on it to define the symbol values. |
19 | runCommand('lemon', dir, '../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y') | 20 | runCommand('lemon', dir, '../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y') |
20 | runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l') | 21 | runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l') |
21 | runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' LuaSL.edc ../../media/LuaSL.edj') | 22 | runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' LuaSL.edc ../../media/LuaSL.edj') |
23 | |||
24 | -- While SledHamr.c does this, we can't use that here, coz LuaSL is not an Elm app. | ||
25 | -- Neither is LuaSL_test actually. | ||
26 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. bin_d .. '\\"' | ||
27 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. lib_d .. '\\"' | ||
28 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. data_d .. '\\"' | ||
29 | CFLAGS = CFLAGS .. ' -DPACKAGE_LOCALE_DIR=\\"' .. locale_d .. '\\"' | ||
30 | |||
22 | compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_threads', 'LuaSL_utilities', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}) | 31 | compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_threads', 'LuaSL_utilities', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}) |
23 | compileFiles('LuaSL_test', dir, {'LuaSL_test', 'LuaSL_utilities'}) | 32 | compileFiles('LuaSL_test', dir, {'LuaSL_test', 'LuaSL_utilities'}) |
diff --git a/src/LuaSL/test.sh b/src/LuaSL/test.sh index 1c26ade..435c5e2 100755 --- a/src/LuaSL/test.sh +++ b/src/LuaSL/test.sh | |||
@@ -4,7 +4,7 @@ wd=$(pwd) | |||
4 | 4 | ||
5 | # Kill any left overs. | 5 | # Kill any left overs. |
6 | killall -KILL LuaSL | 6 | killall -KILL LuaSL |
7 | export LUA_PATH="$wd/../../libraries/?.lua" | 7 | export LUA_PATH="$wd/../../lib/?.lua" |
8 | 8 | ||
9 | case $@ in | 9 | case $@ in |
10 | 10 | ||
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 09b5196..ab09fd0 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -39,7 +39,7 @@ static Elm_Genlist_Item_Class *viewer_gic = NULL; | |||
39 | 39 | ||
40 | //static const char *img1 = PACKAGE_DATA_DIR "/media/plant_01.jpg"; | 40 | //static const char *img1 = PACKAGE_DATA_DIR "/media/plant_01.jpg"; |
41 | //static const char *img2 = PACKAGE_DATA_DIR "/media/sky_01.jpg"; | 41 | //static const char *img2 = PACKAGE_DATA_DIR "/media/sky_01.jpg"; |
42 | static const char *img3 = PACKAGE_DATA_DIR "/media/rock_01.jpg"; | 42 | static const char *img3 = "rock_01.jpg"; |
43 | 43 | ||
44 | 44 | ||
45 | #define EPHYSICS_TEST_THEME "extantz" | 45 | #define EPHYSICS_TEST_THEME "extantz" |
@@ -1240,7 +1240,7 @@ static void woMan_add(GLData *gld) | |||
1240 | // Evas_Object *win, *bg, *bx, *ic, *bb, *av, *en, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; | 1240 | // Evas_Object *win, *bg, *bx, *ic, *bb, *av, *en, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; |
1241 | Evas_Object *win, *bx, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; | 1241 | Evas_Object *win, *bx, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; |
1242 | Elm_Object_Item *tb_it, *menu_it, *tab_it; | 1242 | Elm_Object_Item *tb_it, *menu_it, *tab_it; |
1243 | // char buf[PATH_MAX]; | 1243 | char buf[PATH_MAX]; |
1244 | int i; | 1244 | int i; |
1245 | 1245 | ||
1246 | win = fang_win_add(gld); | 1246 | win = fang_win_add(gld); |
@@ -1351,9 +1351,10 @@ static void woMan_add(GLData *gld) | |||
1351 | evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 1351 | evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
1352 | evas_object_size_hint_align_set(nf, EVAS_HINT_FILL, EVAS_HINT_FILL); | 1352 | evas_object_size_hint_align_set(nf, EVAS_HINT_FILL, EVAS_HINT_FILL); |
1353 | evas_object_show(nf); | 1353 | evas_object_show(nf); |
1354 | 1354 | ||
1355 | sprintf(buf, "%s/%s", elm_app_data_dir_get(), img3); | ||
1355 | tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Viewers", _promote, tab_it); | 1356 | tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Viewers", _promote, tab_it); |
1356 | tab = _content_image_new(win, img3); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Landmarks", _promote, tab_it); | 1357 | tab = _content_image_new(win, strdup(buf)); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Landmarks", _promote, tab_it); |
1357 | tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Grids", _promote, tab_it); | 1358 | tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Grids", _promote, tab_it); |
1358 | elm_box_pack_end(bx, nf); | 1359 | elm_box_pack_end(bx, nf); |
1359 | 1360 | ||
@@ -1393,7 +1394,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
1393 | EPhysics_Body *box_body1, *box_body2; | 1394 | EPhysics_Body *box_body1, *box_body2; |
1394 | Evas_Object *box1, *box2; | 1395 | Evas_Object *box1, *box2; |
1395 | GLData *gld = NULL; | 1396 | GLData *gld = NULL; |
1396 | // char buf[PATH_MAX]; | 1397 | char buf[PATH_MAX]; |
1397 | // int i; | 1398 | // int i; |
1398 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. | 1399 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. |
1399 | 1400 | ||
@@ -1401,10 +1402,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
1401 | // Don't do this, we need to clean up other stuff to, so set a clean up function below. | 1402 | // Don't do this, we need to clean up other stuff to, so set a clean up function below. |
1402 | //elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | 1403 | //elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); |
1403 | 1404 | ||
1404 | // If you want efl to handle finding your bin/lib/data dirs, you must do this below. | 1405 | HamrTime(elm_main, "extantz"); |
1405 | elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); | ||
1406 | elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); | ||
1407 | elm_app_info_set(elm_main, "datadir", "media/sky_03.jpg"); | ||
1408 | fprintf(stdout, "prefix was set to: %s\n", elm_app_prefix_dir_get()); | 1406 | fprintf(stdout, "prefix was set to: %s\n", elm_app_prefix_dir_get()); |
1409 | fprintf(stdout, "data directory is: %s\n", elm_app_data_dir_get()); | 1407 | fprintf(stdout, "data directory is: %s\n", elm_app_data_dir_get()); |
1410 | fprintf(stdout, "library directory is: %s\n", elm_app_lib_dir_get()); | 1408 | fprintf(stdout, "library directory is: %s\n", elm_app_lib_dir_get()); |
@@ -1538,7 +1536,8 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
1538 | ephysics_body_friction_set(boundary, 0); | 1536 | ephysics_body_friction_set(boundary, 0); |
1539 | 1537 | ||
1540 | box1 = elm_image_add(gld->win); | 1538 | box1 = elm_image_add(gld->win); |
1541 | elm_image_file_set(box1, PACKAGE_DATA_DIR "/media/" EPHYSICS_TEST_THEME ".edj", "blue-cube"); | 1539 | sprintf(buf, "%s/%s.edj", elm_app_data_dir_get(), EPHYSICS_TEST_THEME); |
1540 | elm_image_file_set(box1, strdup(buf), "blue-cube"); | ||
1542 | evas_object_move(box1, gld->win_w / 2 - 80, gld->win_h - 200); | 1541 | evas_object_move(box1, gld->win_w / 2 - 80, gld->win_h - 200); |
1543 | evas_object_resize(box1, 70, 70); | 1542 | evas_object_resize(box1, 70, 70); |
1544 | evas_object_show(box1); | 1543 | evas_object_show(box1); |
@@ -1552,7 +1551,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
1552 | ephysics_body_sleeping_threshold_set(box_body1, 0.1, 0.1); | 1551 | ephysics_body_sleeping_threshold_set(box_body1, 0.1, 0.1); |
1553 | 1552 | ||
1554 | box2 = elm_image_add(gld->win); | 1553 | box2 = elm_image_add(gld->win); |
1555 | elm_image_file_set(box2, PACKAGE_DATA_DIR "/media/" EPHYSICS_TEST_THEME ".edj", "purple-cube"); | 1554 | elm_image_file_set(box2, strdup(buf), "purple-cube"); |
1556 | evas_object_move(box2, gld->win_w / 2 + 10, gld->win_h - 200); | 1555 | evas_object_move(box2, gld->win_w / 2 + 10, gld->win_h - 200); |
1557 | evas_object_resize(box2, 70, 70); | 1556 | evas_object_resize(box2, 70, 70); |
1558 | evas_object_show(box2); | 1557 | evas_object_show(box2); |
diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h index afb94af..25b78cf 100644 --- a/src/extantz/extantz.h +++ b/src/extantz/extantz.h | |||
@@ -6,14 +6,8 @@ | |||
6 | #define USE_DEMO 1 | 6 | #define USE_DEMO 1 |
7 | #define DO_GEARS 0 | 7 | #define DO_GEARS 0 |
8 | 8 | ||
9 | #if USE_EO | ||
10 | /* Enable access to unstable EFL API that are still in beta */ | ||
11 | #define EFL_BETA_API_SUPPORT 1 | ||
12 | /* Enable access to unstable EFL EO API. */ | ||
13 | #define EFL_EO_API_SUPPORT 1 | ||
14 | #endif | ||
15 | 9 | ||
16 | #include <Elementary.h> | 10 | #include "SledjHamr.h" |
17 | #include <elm_widget_glview.h> | 11 | #include <elm_widget_glview.h> |
18 | #include <Evas_GL.h> | 12 | #include <Evas_GL.h> |
19 | #include <EPhysics.h> | 13 | #include <EPhysics.h> |
diff --git a/libraries/LumbrJack.c b/src/libraries/LumbrJack.c index 084d916..084d916 100644 --- a/libraries/LumbrJack.c +++ b/src/libraries/LumbrJack.c | |||
diff --git a/libraries/LumbrJack.h b/src/libraries/LumbrJack.h index 4a3290c..4a3290c 100644 --- a/libraries/LumbrJack.h +++ b/src/libraries/LumbrJack.h | |||
diff --git a/libraries/Runnr.c b/src/libraries/Runnr.c index a24e7f5..a24e7f5 100644 --- a/libraries/Runnr.c +++ b/src/libraries/Runnr.c | |||
diff --git a/libraries/Runnr.h b/src/libraries/Runnr.h index dc720ff..dc720ff 100644 --- a/libraries/Runnr.h +++ b/src/libraries/Runnr.h | |||
diff --git a/src/libraries/SledjHamr.c b/src/libraries/SledjHamr.c new file mode 100644 index 0000000..aa68774 --- /dev/null +++ b/src/libraries/SledjHamr.c | |||
@@ -0,0 +1,23 @@ | |||
1 | #include "SledjHamr.h" | ||
2 | |||
3 | void HamrTime(void *elm_main, char *domain) | ||
4 | { | ||
5 | elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); | ||
6 | elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); | ||
7 | elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); | ||
8 | elm_app_compile_locale_set(PACKAGE_LOCALE_DIR); | ||
9 | // Do this after the above calls, but before changing the working directory, or screwing with argv[0]. | ||
10 | // It tries to set up the package paths depending on where the executable is, so things are relocatable. | ||
11 | // First argument is the elm_main() function that Elementary starts us from. | ||
12 | // Second argument should be a lower case string used as the "domain", which is different from the log domain. | ||
13 | // It's used lower case as part of the data directory path. | ||
14 | // So, if prefix is /usr/local, then the system data dir is /usr/local/share, | ||
15 | // and this apps data dir is /usr/local/share/"domain". | ||
16 | // It's used upper case as part of environment variables to override directory paths at run time. | ||
17 | // So "DOMAIN"_PREFIX, "DOMAIN"_BIN_DIR, "DOMAIN"_LIB_DIR, "DOMAIN"_DATA_DIR, and "DOMAIN"_LOCALE_DIR | ||
18 | // Third argument is the name of a file it can check for to make sure it found the correct path. | ||
19 | // This file is looked for in the data dir. | ||
20 | elm_app_info_set(elm_main, domain, "checkme.txt"); | ||
21 | // Once this is all setup, the code can do - | ||
22 | // elm_app_prefix_dir_get(); // or bin, lib, data, locale. | ||
23 | } | ||
diff --git a/src/libraries/SledjHamr.h b/src/libraries/SledjHamr.h new file mode 100644 index 0000000..893d90e --- /dev/null +++ b/src/libraries/SledjHamr.h | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | #define EFL_API_OVERRIDE 1 | ||
3 | /* Enable access to unstable EFL API that are still in beta */ | ||
4 | #define EFL_BETA_API_SUPPORT 1 | ||
5 | /* Enable access to unstable EFL EO API. */ | ||
6 | #define EFL_EO_API_SUPPORT 1 | ||
7 | |||
8 | #include <stdio.h> | ||
9 | #include <ctype.h> | ||
10 | |||
11 | #include <Elementary.h> | ||
12 | |||
13 | |||
14 | void HamrTime(void *elm_main, char *domain); | ||
diff --git a/src/libraries/build.lua b/src/libraries/build.lua new file mode 100755 index 0000000..6566e66 --- /dev/null +++ b/src/libraries/build.lua | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/usr/bin/env lua | ||
2 | |||
3 | local dir = ... | ||
4 | |||
5 | if 'nil' == type(dir) then | ||
6 | local build, err = loadfile('../../build.lua') | ||
7 | if build then | ||
8 | setfenv(build, getfenv(2)) | ||
9 | build(2) | ||
10 | else | ||
11 | print("ERROR - " .. err) | ||
12 | end | ||
13 | dir = workingDir | ||
14 | end | ||
15 | |||
16 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | ||
17 | |||
18 | removeFiles(dir, {'LumbrJack.o', lib_d .. '/libLumbrJack.so', 'Runnr.o', lib_d .. '/libRunnr.so', 'SledjHamr.o', lib_d .. '/libSledjHamr.so'}) | ||
19 | |||
20 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c LumbrJack.c') | ||
21 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libLumbrJack.so -o ' .. lib_d .. '/libLumbrJack.so LumbrJack.o') | ||
22 | |||
23 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c Runnr.c') | ||
24 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libRunnr.so -o ' .. lib_d .. '/libRunnr.so Runnr.o') | ||
25 | |||
26 | -- For Elm apps, these are all centrally controlled in libSledjHamr. | ||
27 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. bin_d .. '\\"' | ||
28 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. lib_d .. '\\"' | ||
29 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. data_d .. '\\"' | ||
30 | CFLAGS = CFLAGS .. ' -DPACKAGE_LOCALE_DIR=\\"' .. locale_d .. '\\"' | ||
31 | |||
32 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c SledjHamr.c') | ||
33 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libSledjHamr.so -o ' .. lib_d .. '/libSledjHamr.so SledjHamr.o') | ||