aboutsummaryrefslogtreecommitdiff
path: root/default.bld
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--default.bld (renamed from buildm3.conf)31
1 files changed, 28 insertions, 3 deletions
diff --git a/buildm3.conf b/default.bld
index ccc7131..8302fc6 100644
--- a/buildm3.conf
+++ b/default.bld
@@ -1,6 +1,6 @@
1# vim: syntax=build 1# vim: syntax=build
2 2
3set CXXFLAGS += "-ggdb -W -Wall"; 3CXXFLAGS += "-ggdb -W -Wall";
4 4
5action "default" 5action "default"
6{ 6{
@@ -12,6 +12,11 @@ action "pkg"
12 build: targets("pkg"); 12 build: targets("pkg");
13} 13}
14 14
15action "all"
16{
17 build: [targets("header-links"), "libbu++.a", targets("tests")];
18}
19
15target files("src/*.h").replace("src/", "bu/") 20target files("src/*.h").replace("src/", "bu/")
16{ 21{
17 tag "header-links"; 22 tag "header-links";
@@ -27,7 +32,27 @@ target "libbu++.a"
27{ 32{
28 input files("src/*.cpp"); 33 input files("src/*.cpp");
29 rule "lib"; 34 rule "lib";
30 set CXXFLAGS += "-I. -fPIC"; 35 CXXFLAGS += "-I. -fPIC";
36}
37
38//
39// Tests
40//
41
42target files("src/tests/*.cpp").replace("src/","").replace(".cpp","")
43{
44 input "src/${OUTPUT}.cpp";
45 rule "exe";
46 tag "tests";
47 CXXFLAGS += "-I.";
48 LDFLAGS += "-L. -lbu++";
49}
50
51// Some tests need extra libs and whatnot, that goes here.
52
53target "tests/bzip2"
54{
55 LDFLAGS += "-lbz2";
31} 56}
32 57
33target "libbu++-r$(svnversion "-n").tar.bz2" 58target "libbu++-r$(svnversion "-n").tar.bz2"
@@ -60,7 +85,7 @@ rule "tarball"
60 "*.sh"); 85 "*.sh");
61 profile "build" 86 profile "build"
62 { 87 {
63 set OUTDIR = OUTPUT.replace(".tar.bz2",""); 88 OUTDIR = OUTPUT.replace(".tar.bz2","");
64 execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |" 89 execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |"
65 " bzip2 -9 > ${OUTPUT}"); 90 " bzip2 -9 > ${OUTPUT}");
66 } 91 }