aboutsummaryrefslogtreecommitdiff
path: root/default.bld
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--default.bld62
1 files changed, 62 insertions, 0 deletions
diff --git a/default.bld b/default.bld
new file mode 100644
index 0000000..ae6c61b
--- /dev/null
+++ b/default.bld
@@ -0,0 +1,62 @@
1
2action "default"
3{
4 build: [targets("header-links"), "libgats.a"];
5}
6
7action "all"
8{
9 build: [targets("header-links"), "libgats.a", targets()];
10}
11
12
13CXXFLAGS += "-ggdb -Wall";
14
15target files("src/*.h").replace("src/", "gats/")
16{
17 tag "header-links";
18 display "symlink";
19 input OUTPUT.replace("gats/","src/");
20 profile "build"
21 {
22 execute("ln -s ../${INPUT} ${OUTPUT}");
23 }
24}
25
26target "libgats.a"
27{
28 rule "lib";
29 input files("src/*.cpp");
30 CXXFLAGS += "-I. -Ilibbu++ -fPIC";
31}
32
33target files("src/tests/*.cpp").replace("src/","").replace(".cpp","")
34{
35 input "src/${OUTPUT}.cpp";
36 rule "exe";
37 tag ["tests", "general tests"];
38 CXXFLAGS += "-I. -Ilibbu++";
39 LDFLAGS += "-L. -lgats -Llibbu++ -lbu++";
40}
41
42target files("src/unit/*.unit").replace("src/","").replace(".unit","")
43{
44 input "src/${OUTPUT}.unit";
45 rule "exe";
46 requires "libbu++.a";
47 tag ["tests", "unit tests"];
48 CXXFLAGS += "-I.";
49 LDFLAGS += "-L. -lbu++ -lgats";
50}
51
52rule "unit"
53{
54 input "*.unit";
55 output INPUT.replace(".unit", ".cpp");
56
57 profile "build"
58 {
59 execute("../libbu++/mkunit \"${INPUT}\" \"${OUTPUT}\"");
60 }
61}
62