diff options
Diffstat (limited to 'src/purkle/build.lua')
-rwxr-xr-x | src/purkle/build.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/purkle/build.lua b/src/purkle/build.lua new file mode 100755 index 0000000..32ff522 --- /dev/null +++ b/src/purkle/build.lua | |||
@@ -0,0 +1,22 @@ | |||
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 | CFLAGS = CFLAGS .. ' -I../GuiLua' | ||
17 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | ||
18 | libs = libs .. ' -lGuiLua -lwinFang -lRunnr' | ||
19 | |||
20 | removeFiles(dir, {lib_d .. '/purkle.so'}) | ||
21 | |||
22 | runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o ' .. lib_d .. '/purkle.so purkle.c') | ||