diff options
-rw-r--r-- | build.conf | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -1,7 +1,8 @@ | |||
1 | # This is a build file for libbu++ | 1 | # This is a build file for libbu++ |
2 | 2 | ||
3 | default action: check "libbu++.a" | 3 | default action: check "libbu++.a" |
4 | "clean" action: clean "libbu++.a" | 4 | "clean" action: clean targets() |
5 | "tests" action: check targets() filter regexp("^tests/.*$") | ||
5 | "all" action: check targets() | 6 | "all" action: check targets() |
6 | 7 | ||
7 | set "CXXFLAGS" += "-ggdb" | 8 | set "CXXFLAGS" += "-ggdb" |
@@ -12,6 +13,21 @@ set "CXXFLAGS" += "-ggdb" | |||
12 | set "CXXFLAGS" += "-Isrc -fPIC", | 13 | set "CXXFLAGS" += "-Isrc -fPIC", |
13 | input filesIn("src") filter regexp("^.*\\.cpp$") | 14 | input filesIn("src") filter regexp("^.*\\.cpp$") |
14 | 15 | ||
16 | directoriesIn("src/test","tests/"): | ||
17 | rule "exe", | ||
18 | target file, | ||
19 | requires "libbu++.a", | ||
20 | set "CXXFLAGS" += "-Isrc", | ||
21 | set "LDFLAGS" += "-L. -lbu++", | ||
22 | input filesIn("{fulldir}") filter regexp("^.*\\.cpp$") | ||
23 | |||
24 | "tests/plugin": set "LDFLAGS" += "-ldl" | ||
25 | |||
26 | rule "exe": | ||
27 | matches regexp("(.*)\\.o$"), | ||
28 | aggregate toString(" "), | ||
29 | perform command("g++ -o {target} {match} {LDFLAGS}") | ||
30 | |||
15 | rule "lib": | 31 | rule "lib": |
16 | matches regexp("(.*)\\.o$"), | 32 | matches regexp("(.*)\\.o$"), |
17 | aggregate toString(" "), | 33 | aggregate toString(" "), |