-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.io
30 lines (25 loc) · 1.19 KB
/
build.io
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
AddonBuilder clone do(
srcDir := Directory with(Directory currentWorkingDirectory .. "/source/discount")
compileDiscountIfNeeded := method(
if((platform == "windows") or(platform == "mingw"),
appendLibSearchPath(Path with(Directory currentWorkingDirectory, "deps/w64/lib") asIoPath)
appendHeaderSearchPath(Path with(Directory currentWorkingDirectory, "/deps/w64/include") asIoPath)
,
prefix := Directory currentWorkingDirectory .. "/_build"
Eerie sh("cd #{srcDir path} && CC='cc -fPIC' ./configure.sh --prefix=#{prefix} && make && make install" interpolate)
appendHeaderSearchPath(Path with(Directory currentWorkingDirectory, "_build/include") asIoPath)
appendLibSearchPath(Path with(Directory currentWorkingDirectory, "_build/lib") asIoPath)
)
)
compileDiscountIfNeeded
dependsOnLib("markdown")
dependsOnHeader("mkdio.h")
clean := method(
resend
if((platform == "windows") or (platform == "mingw"),
"there is no clean command for windows platform" println
,
System system("cd #{srcDir path} && make clean" interpolate)
)
)
)