aboutsummaryrefslogtreecommitdiff
path: root/build.conf
diff options
context:
space:
mode:
Diffstat (limited to 'build.conf')
-rw-r--r--build.conf35
1 files changed, 35 insertions, 0 deletions
diff --git a/build.conf b/build.conf
new file mode 100644
index 0000000..cab11a8
--- /dev/null
+++ b/build.conf
@@ -0,0 +1,35 @@
1# build.conf for build, kind of whacky, eh?
2
3default action: check targets()
4
5set "CXXFLAGS" += "-ggdb -W -Wall"
6
7"build":
8 rule "exe",
9 target file,
10 requires "libbu++/libbu++.a",
11 set "LDFLAGS" += "-Llibbu++ -lbu++ -ldl",
12 set "CXXFLAGS" += "-Ilibbu++",
13 input filesIn("src") filter regexp(".*\\.(cpp|y|l)$")
14
15rule "exe":
16 matches regexp("(.*)\\.o$"),
17 aggregate toString(" "),
18 perform command("g++ -o {target} {match} {LDFLAGS}")
19
20rule "cpp":
21 matches regexp("(.*)\\.(cpp|c)$"),
22 produces "{re:1}.o",
23 requires commandToList("g++ -M {CXXFLAGS} {match}", "make"),
24 perform command("g++ {CXXFLAGS} -c -o {target} {match}")
25
26rule "bison":
27 matches regexp("(.*)\\.y$"),
28 produces ["{re:1}.tab.c", "{re:1}.tab.h", "{re:1}.output"],
29 perform command("bison -v -b{re:1} {match}")
30
31rule "flex":
32 matches regexp("(.*)\\.l$"),
33 produces ["{re:1}.yy.c","{re:1}.yy.h"],
34 perform command("flex {FLEXFLAGS} {match}")
35