diff options
Diffstat (limited to '')
| -rw-r--r-- | build.conf | 17 |
1 files changed, 14 insertions, 3 deletions
| @@ -1,18 +1,29 @@ | |||
| 1 | # This is a build file for build | 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 | "tests" action: check /tests\/.*/ |
| 5 | "clean" action: clean /.*/ | ||
| 6 | "all" action: check /.*/ | ||
| 5 | 7 | ||
| 6 | create file libbu++.a from files in src using rule lib | 8 | create file libbu++.a from files in src using rule lib |
| 7 | 9 | ||
| 8 | set CXXFLAGS += "-ggdb" | 10 | for directories matching /src\/test\/(.*)/ in src/test ... |
| 11 | create file "tests/{re:1}" from files in "{match}" using rule exe | ||
| 9 | 12 | ||
| 13 | set CXXFLAGS += "-ggdb" | ||
| 10 | set CXXFLAGS += "-Isrc -fPIC" | 14 | set CXXFLAGS += "-Isrc -fPIC" |
| 11 | 15 | ||
| 16 | for targets matching /tests\/.*/ set LDFLAGS += "-L. -lbu++" | ||
| 17 | for testes/plugin set LDFLAGS += "-ldl" | ||
| 18 | |||
| 12 | /(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*" | 19 | /(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*" |
| 20 | /tests\/.*/ requires libbu++.a | ||
| 13 | 21 | ||
| 14 | rule lib matches all /(.*)\.o$/ perform command ... | 22 | rule lib matches all /(.*)\.o$/ perform command ... |
| 15 | "ar cr {target} {match}" | 23 | "ar cr {target} {match}" |
| 16 | 24 | ||
| 17 | rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ... | 25 | rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ... |
| 18 | "g++ {CXXFLAGS} -c -o {target} {match}" | 26 | "g++ {CXXFLAGS} -c -o {target} {match}" |
| 27 | |||
| 28 | rule exe matches all /(.*)\.o$/ perform command ... | ||
| 29 | "g++ -o {target} {match} {LDFLAGS}" | ||
