summaryrefslogtreecommitdiff
path: root/build.conf
blob: 48def8a4af835d8e09e61c6bca9400b017b137e0 (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
# This is a build file for libbu++

default action: check "libbu++.a"
"clean" action: clean "libbu++.a"
"all" action: check targets()

set "CXXFLAGS" += "-ggdb"

"libbu++.a":
	rule "lib",
	target file,
	set "CXXFLAGS" += "-Isrc -fPIC",
	input filesIn("src") filter regexp("^.*\\.cpp$")

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}")