# This is a build file for libbu++ default action: check "libbu++.a" "clean" action: clean targets() "tests" action: check targets() filter regexp("^tests/.*$") "all" action: check targets() set "CXXFLAGS" += "-ggdb" "libbu++.a": rule "lib", target file, set "CXXFLAGS" += "-Isrc -fPIC", input filesIn("src") filter regexp("^.*\\.cpp$") directoriesIn("src/test","tests/"): rule "exe", target file, requires "libbu++.a", set "CXXFLAGS" += "-Isrc", set "LDFLAGS" += "-L. -lbu++", input filesIn("{fulldir}") filter regexp("^.*\\.cpp$") "tests/plugin": set "LDFLAGS" += "-ldl" rule "exe": matches regexp("(.*)\\.o$"), aggregate toString(" "), perform command("g++ -o {target} {match} {LDFLAGS}") rule "lib": matches regexp("(.*)\\.o$"), aggregate toString(" "), perform command("ar cr {target} {match}") rule "cpp": matches regexp("(.*)\\.cpp$"), produces "{re:1}.o", requires commandToList("g++ -M {CXXFLAGS} {match}", "make"), perform command("g++ {CXXFLAGS} -c -o {target} {match}")