aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ClientHamr/GuiLua/GuiLua.c379
-rw-r--r--ClientHamr/GuiLua/GuiLua.h39
-rwxr-xr-xClientHamr/GuiLua/build.lua2
-rwxr-xr-xClientHamr/extantz/build.lua2
-rwxr-xr-xLuaSL/build.lua2
-rw-r--r--LumbrJack/README1
-rw-r--r--Runnr/README1
-rwxr-xr-xRunnr/build.lua21
-rwxr-xr-xbuild.lua22
-rw-r--r--libraries/LumbrJack.c (renamed from LumbrJack/LumbrJack.c)0
-rw-r--r--libraries/LumbrJack.h (renamed from LumbrJack/LumbrJack.h)0
-rw-r--r--libraries/README8
-rw-r--r--libraries/Runnr.c (renamed from Runnr/Runnr.c)0
-rw-r--r--libraries/Runnr.h (renamed from Runnr/Runnr.h)0
-rwxr-xr-xlibraries/build.lua (renamed from LumbrJack/build.lua)5
15 files changed, 33 insertions, 449 deletions
diff --git a/ClientHamr/GuiLua/GuiLua.c b/ClientHamr/GuiLua/GuiLua.c
index cb7f64c..1e6d3fa 100644
--- a/ClientHamr/GuiLua/GuiLua.c
+++ b/ClientHamr/GuiLua/GuiLua.c
@@ -147,383 +147,6 @@ globals ourGlobals;
147static const char *globName = "ourGlobals"; 147static const char *globName = "ourGlobals";
148 148
149 149
150void dumpStack(lua_State *L, int i)
151{
152 int type = lua_type(L, i);
153
154 switch (type)
155 {
156 case LUA_TNONE : printf("Stack %d is empty\n", i); break;
157 case LUA_TNIL : printf("Stack %d is a nil\n", i); break;
158 case LUA_TBOOLEAN : printf("Stack %d is a boolean - %d\n", i, lua_toboolean(L, i)); break;
159 case LUA_TNUMBER : printf("Stack %d is a number\n - %f", i, lua_tonumber(L, i)); break;
160 case LUA_TSTRING : printf("Stack %d is a string - %s\n", i, lua_tostring(L, i)); break;
161 case LUA_TFUNCTION : printf("Stack %d is a function\n", i); break;
162 case LUA_TTHREAD : printf("Stack %d is a thread\n", i); break;
163 case LUA_TTABLE :
164 {
165 int j;
166
167 printf("Stack %d is a table", i);
168 lua_getfield(L, i, "_NAME");
169 j = lua_gettop(L);
170 if (lua_isstring(L, j))
171 printf(" - %s", lua_tostring(L, j));
172 lua_pop(L, 1);
173 printf("\n");
174 break;
175 }
176 case LUA_TUSERDATA : printf("Stack %d is a userdata\n", i); break;
177 case LUA_TLIGHTUSERDATA : printf("Stack %d is a light userdata\n", i); break;
178 default : printf("Stack %d is unknown\n", i); break;
179 }
180}
181
182static char dateTime[DATE_TIME_LEN];
183
184static void _ggg_log_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args)
185{
186 FILE *f = data;
187 char dt[DATE_TIME_LEN + 1];
188 char fileTab[256], funcTab[256];
189
190 getDateTime(NULL, dt, NULL);
191 dt[19] = '\0';
192 if (12 > strlen(file))
193 snprintf(fileTab, sizeof(fileTab), "%s\t\t", file);
194 else
195 snprintf(fileTab, sizeof(fileTab), "%s\t", file);
196 snprintf(funcTab, sizeof(funcTab), "\t%s", fnc);
197 fprintf(f, "%s ", dt);
198 if (f == stderr)
199 eina_log_print_cb_stderr(d, level, fileTab, funcTab, line, fmt, data, args);
200 else if (f == stdout)
201 eina_log_print_cb_stdout(d, level, fileTab, funcTab, line, fmt, data, args);
202 fflush(f);
203}
204
205void loggingStartup(globals *ourGlobals)
206{
207 if (ourGlobals->logDom < 0)
208 {
209 ourGlobals->logDom = eina_log_domain_register("GuiLua", NULL);
210 if (ourGlobals->logDom < 0)
211 {
212 EINA_LOG_CRIT("could not register log domain 'GuiLua'");
213 return;
214 }
215 }
216 eina_log_level_set(EINA_LOG_LEVEL_DBG);
217 eina_log_domain_level_set("GuiLua", EINA_LOG_LEVEL_DBG);
218 eina_log_print_cb_set(_ggg_log_print_cb, stderr);
219
220 // Shut up the excess debugging shit from EFL.
221 eina_log_domain_level_set("ecore_input_evas", EINA_LOG_LEVEL_WARN);
222}
223
224char *getDateTime(struct tm **nowOut, char *dateOut, time_t *timeOut)
225{
226 struct tm *newTime;
227 time_t szClock;
228 char *date = dateTime;
229
230 // Get time in seconds
231 time(&szClock);
232 // Convert time to struct tm form
233 newTime = localtime(&szClock);
234
235 if (nowOut)
236 *nowOut = newTime;
237 if (dateOut)
238 date = dateOut;
239 if (timeOut)
240 *timeOut = szClock;
241
242 // format
243 strftime(date, DATE_TIME_LEN, "%d/%m/%Y %H:%M:%S\r", newTime);
244 return (dateTime);
245}
246
247
248// These are what the various symbols are for each type -
249// int %
250// num #
251// str $
252// bool !
253// C func &
254// table.field @ Expects an integer and a string.
255// nil ~
256// table {} Starts and stops filling up a new table.
257// ( Just syntax sugar for call.
258// call ) Expects an integer, the number of results left after the call.
259// FIXME: Still to do, if we ever use them -
260// stack = Get a value from the stack, expects a stack index.
261// userdata +
262// lightuserdata *
263// thread ^
264
265static char *_push_name(lua_State *L, char *q, int *idx) // Stack usage [-0, +1, e or m]
266{
267 char *p = q;
268 char temp = '\0';
269
270 // A simplistic scan through an identifier, it's wrong, but it's quick,
271 // and we don't mind that it's wrong, coz this is only internal.
272 while (isalnum((int)*q))
273 q++;
274 temp = *q;
275 *q = '\0';
276 if (*idx > 0)
277 lua_getfield(L, *idx, p); // Stack usage [-0, +1, e]
278 else
279 {
280 if (p != q)
281 lua_pushstring(L, p); // Stack usage [-0, +1, m]
282 else
283 {
284 lua_pushnumber(L, (lua_Number) (0 - (*idx)));
285 (*idx)--;
286 }
287 }
288 *q = temp;
289
290 return q;
291}
292
293int pull_lua(lua_State *L, int i, char *params, ...) // Stack usage -
294 // if i is a table
295 // [-n, +n, e]
296 // else
297 // [-0, +0, -]
298{
299 va_list vl;
300 char *f = strdup(params);
301 char *p = f;
302 int n = 0, j = i, count = 0;
303 Eina_Bool table = EINA_FALSE;
304
305 if (!f) return -1;
306 va_start(vl, params);
307
308 if (lua_istable(L, i)) // Stack usage [-0, +0, -]
309 {
310 j = -1;
311 table = EINA_TRUE;
312 }
313
314 while (*p)
315 {
316 char *q;
317 Eina_Bool get = EINA_TRUE;
318
319 while (isspace((int)*p))
320 p++;
321 q = p + 1;
322 switch (*p)
323 {
324 case '%':
325 {
326 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, e]
327 if (lua_isnumber(L, j)) // Stack usage [-0, +0, -]
328 {
329 int *v = va_arg(vl, int *);
330 *v = lua_tointeger(L, j); // Stack usage [-0, +0, -]
331 n++;
332 }
333 break;
334 }
335 case '#':
336 {
337 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, e]
338 if (lua_isnumber(L, j)) // Stack usage [-0, +0, -]
339 {
340 double *v = va_arg(vl, double *);
341 *v = lua_tonumber(L, j); // Stack usage [-0, +0, -]
342 n++;
343 }
344 break;
345 }
346 case '$':
347 {
348 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, e]
349 if (lua_isstring(L, j)) // Stack usage [-0, +0, -]
350 {
351 char **v = va_arg(vl, char **);
352 size_t len;
353 char *temp = (char *) lua_tolstring(L, j, &len); // Stack usage [-0, +0, m]
354
355 len++; // Cater for the null at the end.
356 *v = malloc(len);
357 if (*v)
358 {
359 memcpy(*v, temp, len);
360 n++;
361 }
362 }
363 break;
364 }
365 case '!':
366 {
367 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, e]
368 if (lua_isboolean(L, j)) // Stack usage [-0, +0, -]
369 {
370 int *v = va_arg(vl, int *);
371 *v = lua_toboolean(L, j); // Stack usage [-0, +0, -]
372 n++;
373 }
374 break;
375 }
376 default:
377 {
378 get = EINA_FALSE;
379 break;
380 }
381 }
382
383 if (get)
384 {
385 if (table)
386 {
387 // If this is a table, then we pushed a value on the stack, pop it off.
388 lua_pop(L, 1); // Stack usage [-n, +0, -]
389 }
390 else
391 j++;
392 count++;
393 }
394 p = q;
395 }
396
397 va_end(vl);
398 free(f);
399 if (count > n)
400 n = 0;
401 else if (table)
402 n = 1;
403 return n;
404}
405
406int push_lua(lua_State *L, char *params, ...) // Stack usage [-0, +n, em]
407{
408 va_list vl;
409 char *f = strdup(params);
410 char *p = f;
411 int n = 0, table = 0, i = -1;
412
413 if (!f) return -1;
414
415 va_start(vl, params);
416
417 while (*p)
418 {
419 char *q;
420 Eina_Bool set = EINA_TRUE;
421
422 while (isspace((int)*p))
423 p++;
424 q = p + 1;
425 switch (*p)
426 {
427 case '%':
428 {
429 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
430 lua_pushinteger(L, va_arg(vl, int)); // Stack usage [-0, +1, -]
431 break;
432 }
433 case '#':
434 {
435 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
436 lua_pushnumber(L, va_arg(vl, double)); // Stack usage [-0, +1, -]
437 break;
438 }
439 case '$':
440 {
441 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
442 lua_pushstring(L, va_arg(vl, char *)); // Stack usage [-0, +1, m]
443 break;
444 }
445 case '!':
446 {
447 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
448 lua_pushboolean(L, va_arg(vl, int)); // Stack usage [-0, +1, -]
449 break;
450 }
451 case '=':
452 {
453 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
454 lua_pushvalue(L, va_arg(vl, int)); // Stack usage [-0, +1, -]
455 break;
456 }
457 case '@':
458 {
459 int tabl = va_arg(vl, int);
460 char *field = va_arg(vl, char *);
461
462 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
463 lua_getfield(L, tabl, field); // Stack usage [-0, +1, e]
464 break;
465 }
466 case '&':
467 {
468 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
469 lua_pushcfunction(L, va_arg(vl, void *)); // Stack usage [-0, +1, m]
470 break;
471 }
472 case '~':
473 {
474 if (table) q = _push_name(L, q, &i); // Stack usage [-0, +1, m]
475 lua_pushnil(L); // Stack usage [-0, +1, -]
476 break;
477 }
478 case '(': // Just syntax sugar.
479 {
480 set = EINA_FALSE;
481 break;
482 }
483 case ')':
484 {
485 lua_call(L, n - 1, va_arg(vl, int));
486 n = 0;
487 set = EINA_FALSE;
488 break;
489 }
490 case '{':
491 {
492 lua_newtable(L);
493 table++;
494 n++;
495 set = EINA_FALSE;
496 break;
497 }
498 case '}':
499 {
500 table--;
501 set = EINA_FALSE;
502 break;
503 }
504 default:
505 {
506 set = EINA_FALSE;
507 break;
508 }
509 }
510
511 if (set)
512 {
513 if (table > 0)
514 lua_settable(L, -3); // Stack usage [-2, +0, e]
515 else
516 n++;
517 }
518 p = q;
519 }
520
521 va_end(vl);
522 free(f);
523 return n;
524}
525
526
527// TODO - These functions should be able to deal with multiple windows. 150// TODO - These functions should be able to deal with multiple windows.
528// TODO - Should be able to open external and internal windows, and even switch between them on the fly. 151// TODO - Should be able to open external and internal windows, and even switch between them on the fly.
529static void _on_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 152static void _on_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
@@ -742,7 +365,7 @@ int luaopen_libGuiLua(lua_State *L)
742 365
743 // In theory this function only ever gets called once. 366 // In theory this function only ever gets called once.
744 memset(&ourGlobals, 0, sizeof(globals)); 367 memset(&ourGlobals, 0, sizeof(globals));
745 loggingStartup(&ourGlobals); 368 ourGlobals.logDom = loggingStartup("GuiLua", ourGlobals.logDom);
746 369
747 elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE); 370 elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE);
748 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_NONE); 371 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_NONE);
diff --git a/ClientHamr/GuiLua/GuiLua.h b/ClientHamr/GuiLua/GuiLua.h
index 50aa3da..156fa1a 100644
--- a/ClientHamr/GuiLua/GuiLua.h
+++ b/ClientHamr/GuiLua/GuiLua.h
@@ -9,46 +9,21 @@
9#include <lualib.h> 9#include <lualib.h>
10#include <lauxlib.h> 10#include <lauxlib.h>
11 11
12#include "LumbrJack.h"
13#include "Runnr.h"
14
12typedef struct _globals globals; 15typedef struct _globals globals;
13 16
14 17
15#define WIDTH (300) 18#define WIDTH (300)
16#define HEIGHT (300) 19#define HEIGHT (300)
17 20
18#define PC(...) EINA_LOG_DOM_CRIT(ourGlobals->logDom, __VA_ARGS__)
19#define PE(...) EINA_LOG_DOM_ERR(ourGlobals->logDom, __VA_ARGS__)
20#define PW(...) EINA_LOG_DOM_WARN(ourGlobals->logDom, __VA_ARGS__)
21#define PD(...) EINA_LOG_DOM_DBG(ourGlobals->logDom, __VA_ARGS__)
22#define PI(...) EINA_LOG_DOM_INFO(ourGlobals->logDom, __VA_ARGS__)
23
24#define PCm(...) EINA_LOG_DOM_CRIT(ourGlobals.logDom, __VA_ARGS__)
25#define PEm(...) EINA_LOG_DOM_ERR(ourGlobals.logDom, __VA_ARGS__)
26#define PWm(...) EINA_LOG_DOM_WARN(ourGlobals.logDom, __VA_ARGS__)
27#define PDm(...) EINA_LOG_DOM_DBG(ourGlobals.logDom, __VA_ARGS__)
28#define PIm(...) EINA_LOG_DOM_INFO(ourGlobals.logDom, __VA_ARGS__)
29
30#define D() PD("DEBUG")
31
32#define SKANG "skang" 21#define SKANG "skang"
33#define MODULEBEGIN "moduleBegin" 22#define MODULEBEGIN "moduleBegin"
34#define MODULEEND "moduleEnd" 23#define MODULEEND "moduleEnd"
35#define THINGASM "thingasm" 24#define THINGASM "thingasm"
36 25
37 26
38// "01:03:52 01-01-1973\n\0"
39#define DATE_TIME_LEN 21
40# define DATE_TIME_LEN 21
41
42
43#ifndef FALSE
44// NEVER change this
45typedef enum
46{
47 FALSE = 0,
48 TRUE = 1
49} boolean;
50#endif
51
52struct _globals 27struct _globals
53{ 28{
54 Evas_Object *win; // Our Elm window. 29 Evas_Object *win; // Our Elm window.
@@ -56,13 +31,5 @@ struct _globals
56}; 31};
57 32
58 33
59void dumpStack(lua_State *L, int i);
60
61void loggingStartup(globals *ourGlobals);
62char *getDateTime(struct tm **nowOut, char *dateOut, time_t *tiemOut);
63
64int pull_lua(lua_State *L, int i, char *params, ...);
65int push_lua(lua_State *L, char *params, ...);
66
67int luaopen_widget(lua_State *L); 34int luaopen_widget(lua_State *L);
68void GuiLuaDo(int argc, char **argv); 35void GuiLuaDo(int argc, char **argv);
diff --git a/ClientHamr/GuiLua/build.lua b/ClientHamr/GuiLua/build.lua
index d2ffdd9..46a4cc5 100755
--- a/ClientHamr/GuiLua/build.lua
+++ b/ClientHamr/GuiLua/build.lua
@@ -6,7 +6,7 @@ if 'nil' == type(dir) then
6 local build, err = loadfile('../../build.lua') 6 local build, err = loadfile('../../build.lua')
7 if build then 7 if build then
8 setfenv(build, getfenv(2)) 8 setfenv(build, getfenv(2))
9 build('') 9 build(2)
10 else 10 else
11 print("ERROR - " .. err) 11 print("ERROR - " .. err)
12 end 12 end
diff --git a/ClientHamr/extantz/build.lua b/ClientHamr/extantz/build.lua
index ca67fec..096c5ff 100755
--- a/ClientHamr/extantz/build.lua
+++ b/ClientHamr/extantz/build.lua
@@ -6,7 +6,7 @@ if 'nil' == type(dir) then
6 local build, err = loadfile('../../build.lua') 6 local build, err = loadfile('../../build.lua')
7 if build then 7 if build then
8 setfenv(build, getfenv(2)) 8 setfenv(build, getfenv(2))
9 build('') 9 build(2)
10 else 10 else
11 print("ERROR - " .. err) 11 print("ERROR - " .. err)
12 end 12 end
diff --git a/LuaSL/build.lua b/LuaSL/build.lua
index 6b71532..c74cad6 100755
--- a/LuaSL/build.lua
+++ b/LuaSL/build.lua
@@ -6,7 +6,7 @@ if 'nil' == type(dir) then
6 local build, err = loadfile('../build.lua') 6 local build, err = loadfile('../build.lua')
7 if build then 7 if build then
8 setfenv(build, getfenv(2)) 8 setfenv(build, getfenv(2))
9 build('') 9 build(1)
10 else 10 else
11 print("ERROR - " .. err) 11 print("ERROR - " .. err)
12 end 12 end
diff --git a/LumbrJack/README b/LumbrJack/README
deleted file mode 100644
index 367724f..0000000
--- a/LumbrJack/README
+++ /dev/null
@@ -1 +0,0 @@
1A library of logging stuff, coz every one wants to log.
diff --git a/Runnr/README b/Runnr/README
deleted file mode 100644
index 65ddc0b..0000000
--- a/Runnr/README
+++ /dev/null
@@ -1 +0,0 @@
1A library for running Lua scripts. Named (sorta) after a friend of mine.
diff --git a/Runnr/build.lua b/Runnr/build.lua
deleted file mode 100755
index 4384376..0000000
--- a/Runnr/build.lua
+++ /dev/null
@@ -1,21 +0,0 @@
1#!/usr/bin/env lua
2
3local dir = ...
4
5if '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
14end
15
16LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS
17
18removeFiles(dir, {'Runnr.o', 'libRunnr.so'})
19
20runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c Runnr.c')
21runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libRunnr.so -o libRunnr.so Runnr.o')
diff --git a/build.lua b/build.lua
index c6b0748..c7177fa 100755
--- a/build.lua
+++ b/build.lua
@@ -49,13 +49,20 @@ local buildSub = function (name, dir)
49 end 49 end
50end 50end
51 51
52
53workingDir = readCommand('pwd')
54baseDir = workingDir
55if 'number' == type(args) then
56 for i = 1, args do
57 baseDir = string.gsub(baseDir, '(.*)/.-$', '%1')
58 end
59end
60
52-- Likely this will fail, coz Lua likes to strip out environmont variables. 61-- Likely this will fail, coz Lua likes to strip out environmont variables.
53-- On the other hand, there's a more direct way to get to environment variables, it would fail to. 62-- On the other hand, there's a more direct way to get to environment variables, it would fail to.
54CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') 63CFLAGOPTS = readCommand('echo "$CFLAGOPTS"')
55 64
56workingDir = readCommand('pwd') 65CFLAGS = '-g -Wall -I include -I ' .. baseDir .. '/libraries'
57-- TODO - -I ../../libraries will be wrong for somethings, but right now those things don't care.
58CFLAGS = '-g -Wall -I include -I ../../libraries'
59CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') 66CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit')
60CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') 67CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo')
61CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') 68CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet')
@@ -72,8 +79,8 @@ CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. workingDir .. '\\"'
72CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"' 79CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"'
73CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS 80CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS
74 81
75LDFLAGS = pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib' 82LDFLAGS = '-L ' .. baseDir .. '/libraries ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L /usr/lib -L /lib'
76libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' 83libs = '-lLumbrJack -lRunnr ' .. pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm'
77LFLAGS = '-d' 84LFLAGS = '-d'
78EDJE_FLAGS = '-id images -fd fonts' 85EDJE_FLAGS = '-id images -fd fonts'
79 86
@@ -85,9 +92,8 @@ if 'nil' == type(args) then
85 compileFiles('lemon', 'libraries/lemon', {'lemon'}) 92 compileFiles('lemon', 'libraries/lemon', {'lemon'})
86 print('_______________ BUILDING Irrlicht _______________') 93 print('_______________ BUILDING Irrlicht _______________')
87 -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. 94 -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test.
88 runCommand('Irrlicht', 'libraries/irrlicht-1.8.1/source/Irrlicht', 'make') 95 runCommand('Irrlicht','libraries/irrlicht-1.8.1/source/Irrlicht', 'make')
89 buildSub('LumbrJack', 'LumbrJack') 96 buildSub('libraries', 'libraries')
90 buildSub('Runnr', 'Runnr')
91 buildSub('LuaSL', 'LuaSL') 97 buildSub('LuaSL', 'LuaSL')
92 buildSub('GuiLua', 'ClientHamr/GuiLua') 98 buildSub('GuiLua', 'ClientHamr/GuiLua')
93 buildSub('extantz', 'ClientHamr/extantz') 99 buildSub('extantz', 'ClientHamr/extantz')
diff --git a/LumbrJack/LumbrJack.c b/libraries/LumbrJack.c
index 9760766..9760766 100644
--- a/LumbrJack/LumbrJack.c
+++ b/libraries/LumbrJack.c
diff --git a/LumbrJack/LumbrJack.h b/libraries/LumbrJack.h
index 4a3290c..4a3290c 100644
--- a/LumbrJack/LumbrJack.h
+++ b/libraries/LumbrJack.h
diff --git a/libraries/README b/libraries/README
index 8ef38d3..a26fda1 100644
--- a/libraries/README
+++ b/libraries/README
@@ -21,3 +21,11 @@ that anymore.
21 21
22luaproc has been hacked up a bit, and will continue to be hacked up. 22luaproc has been hacked up a bit, and will continue to be hacked up.
23Merged it into LuaSL, so it's no longer here. 23Merged it into LuaSL, so it's no longer here.
24
25--------------------------------------------------------------------
26
27These are the libraries written for the SledjHamr project.
28
29LumbrJack is a library of logging stuff, coz every one wants to log.
30
31Runnr is for running Lua scripts. Named (sorta) after a friend of mine.
diff --git a/Runnr/Runnr.c b/libraries/Runnr.c
index a24e7f5..a24e7f5 100644
--- a/Runnr/Runnr.c
+++ b/libraries/Runnr.c
diff --git a/Runnr/Runnr.h b/libraries/Runnr.h
index dc720ff..dc720ff 100644
--- a/Runnr/Runnr.h
+++ b/libraries/Runnr.h
diff --git a/LumbrJack/build.lua b/libraries/build.lua
index 3181bef..8b48b70 100755
--- a/LumbrJack/build.lua
+++ b/libraries/build.lua
@@ -15,7 +15,10 @@ end
15 15
16LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS 16LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS
17 17
18removeFiles(dir, {'LumbrJack.o', 'libLumbrJack.so'}) 18removeFiles(dir, {'LumbrJack.o', 'libLumbrJack.so', 'Runnr.o', 'libRunnr.so'})
19 19
20runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c LumbrJack.c') 20runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c LumbrJack.c')
21runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libLumbrJack.so -o libLumbrJack.so LumbrJack.o') 21runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libLumbrJack.so -o libLumbrJack.so LumbrJack.o')
22
23runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c Runnr.c')
24runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libRunnr.so -o libRunnr.so Runnr.o')