aboutsummaryrefslogtreecommitdiff
path: root/build.conf
blob: 3da3df598a1285d3d080a720ceff32178c8538a8 (plain)
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
# This is a build file for libbu++

default action: check "libbu++.a"
"tests" action: check /tests\/.*/
"clean" action: clean /.*/
"all" action: check /.*/

create file "libbu++.a" from files in src using rule lib

for directories matching /src\/test\/(.*)/ in src/test ...
	create file "tests/{re:1}" from files in "{match}" using rule exe

set CXXFLAGS += "-ggdb"
set CXXFLAGS += "-Isrc -fPIC"

for targets matching /tests\/.*/ set LDFLAGS += "-L. -lbu++"
for testes/plugin set LDFLAGS += "-ldl"

/(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*"
/tests\/.*/ requires "libbu++.a"

rule lib matches all /(.*)\.o$/ perform command ...
	"ar cr {target} {match}"

rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ...
	"g++ {CXXFLAGS} -c -o {target} {match}"

rule exe matches all /(.*)\.o$/ perform command ...
	"g++ -o {target} {match} {LDFLAGS}"