aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++/default.bld
diff options
context:
space:
mode:
Diffstat (limited to 'c++-libbu++/default.bld')
-rw-r--r--c++-libbu++/default.bld109
1 files changed, 109 insertions, 0 deletions
diff --git a/c++-libbu++/default.bld b/c++-libbu++/default.bld
new file mode 100644
index 0000000..676c63e
--- /dev/null
+++ b/c++-libbu++/default.bld
@@ -0,0 +1,109 @@
1
2execute("mkdir -p tmp");
3
4action "default"
5{
6 build: [targets("header-links"), "libgats.a", "gatsc"];
7}
8
9action "all"
10{
11 build: [targets("header-links"), "libgats.a", targets("headers"),
12 targets()];
13}
14
15action "gatscon"
16{
17 build: [targets("header-links"), "libgats.a",
18 targets("headers"), "gatscon"];
19}
20
21CXXFLAGS += "-ggdb -Wall";
22
23target [files("src/*.h").replace("src/", "gats/"), "gats/version.h"]
24{
25 tag "header-links";
26 display "symlink";
27 input OUTPUT.replace("gats/","src/");
28 profile "build"
29 {
30 execute("ln -s ../${INPUT} ${OUTPUT}");
31 }
32}
33
34target "src/version.h"
35{
36 input ".svn";
37 display "svnver";
38 profile "build"
39 {
40 execute("echo Revision number: `svnversion`; echo \\#ifndef LIBGATS_VC_ID > ${OUTPUT}; echo \\#define LIBGATS_VC_ID \\\"`svnversion`\\\" >> ${OUTPUT}; echo \\#endif >> ${OUTPUT}");
41 }
42}
43
44target "libgats.a"
45{
46 rule "lib";
47 input files("src/*.cpp");
48 CXXFLAGS += "-I. -Ilibbu++ -fPIC";
49}
50
51target "gatsc"
52{
53 rule "exe";
54 input files("src/gatsc/*.cpp");
55 CXXFLAGS += "-I. -Ilibbu++";
56 LDFLAGS += "-L. -lgats -lbu++";
57}
58
59target files("src/tests/*.cpp").replace("src/","").replace(".cpp","")
60{
61 input "src/${OUTPUT}.cpp";
62 rule "exe";
63 tag ["tests", "general tests"];
64 CXXFLAGS += "-I. -Ilibbu++";
65 LDFLAGS += "-L. -lgats -Llibbu++ -lbu++";
66}
67
68target files("src/unit/*.unit").replace("src/","").replace(".unit","")
69{
70 input "src/${OUTPUT}.unit";
71 rule "exe";
72 requires "libbu++.a";
73 tag ["tests", "unit tests"];
74 CXXFLAGS += "-I.";
75 LDFLAGS += "-L. -lgats -lbu++";
76}
77
78rule "unit"
79{
80 input "*.unit";
81 output INPUT.replace(".unit", ".cpp");
82
83 profile "build"
84 {
85 execute("../libbu++/mkunit \"${INPUT}\" \"${OUTPUT}\"");
86 }
87}
88
89include "qt4.bld";
90
91QTDIR = "/opt/qt-4";
92MOC_DIR = "tmp";
93RCC_DIR = "tmp";
94UI_DIR = "tmp";
95
96target "gatscon"
97{
98 input files("src/gatscon/*.h", "src/gatscon/*.cpp", "src/gatscon/*.ui");
99 rule "exe";
100
101 CXXFLAGS += qt_getCXXFLAGS();
102 LDFLAGS += qt_getLDFLAGS();
103
104 CXXFLAGS += "-Isrc/gatscon";
105
106 CXXFLAGS += "-I. -Ilibbu++ -Itmp -Ilibzamui/src";
107 LDFLAGS += "-L. -lgats -Llibbu++ -lbu++ -Llibzamui -lzamui";
108}
109