diff options
Diffstat (limited to 'c++-libbu++/default.bld')
-rw-r--r-- | c++-libbu++/default.bld | 109 |
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 | |||
2 | execute("mkdir -p tmp"); | ||
3 | |||
4 | action "default" | ||
5 | { | ||
6 | build: [targets("header-links"), "libgats.a", "gatsc"]; | ||
7 | } | ||
8 | |||
9 | action "all" | ||
10 | { | ||
11 | build: [targets("header-links"), "libgats.a", targets("headers"), | ||
12 | targets()]; | ||
13 | } | ||
14 | |||
15 | action "gatscon" | ||
16 | { | ||
17 | build: [targets("header-links"), "libgats.a", | ||
18 | targets("headers"), "gatscon"]; | ||
19 | } | ||
20 | |||
21 | CXXFLAGS += "-ggdb -Wall"; | ||
22 | |||
23 | target [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 | |||
34 | target "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 | |||
44 | target "libgats.a" | ||
45 | { | ||
46 | rule "lib"; | ||
47 | input files("src/*.cpp"); | ||
48 | CXXFLAGS += "-I. -Ilibbu++ -fPIC"; | ||
49 | } | ||
50 | |||
51 | target "gatsc" | ||
52 | { | ||
53 | rule "exe"; | ||
54 | input files("src/gatsc/*.cpp"); | ||
55 | CXXFLAGS += "-I. -Ilibbu++"; | ||
56 | LDFLAGS += "-L. -lgats -lbu++"; | ||
57 | } | ||
58 | |||
59 | target 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 | |||
68 | target 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 | |||
78 | rule "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 | |||
89 | include "qt4.bld"; | ||
90 | |||
91 | QTDIR = "/opt/qt-4"; | ||
92 | MOC_DIR = "tmp"; | ||
93 | RCC_DIR = "tmp"; | ||
94 | UI_DIR = "tmp"; | ||
95 | |||
96 | target "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 | |||