aboutsummaryrefslogtreecommitdiff
path: root/build.conf
diff options
context:
space:
mode:
Diffstat (limited to 'build.conf')
-rw-r--r--build.conf116
1 files changed, 0 insertions, 116 deletions
diff --git a/build.conf b/build.conf
deleted file mode 100644
index b29809d..0000000
--- a/build.conf
+++ /dev/null
@@ -1,116 +0,0 @@
1# Build config file for libbu++
2#
3# Copyright (C) 2007-2008 Xagasoft, All rights reserved.
4#
5# This file is part of the libbu++ library and is released under the
6# terms of the license contained in the file LICENSE.
7
8default action: check group "lnhdrs", check "libbu++.a", check group "tools"
9"tests" action: check group "lnhdrs", check group "tests"
10"all" action: check group "lnhdrs", check targets()
11"optparser" action: check "tests/optparser"
12
13set "CXXFLAGS" += "-ggdb -W -Wall"
14#set "CXXFLAGS" += "-O2 -Wall"
15
16# set "CXXFLAGS" += "-pg"
17# set "LDFLAGS" += "-pg"
18
19filesIn("src") filter regexp("^src/(.*)\\.h$", "bu/{re:1}.h"):
20 rule "hln",
21 group "lnhdrs",
22 target file,
23 input "src/{re:1}.h"
24
25"libbu++.a":
26 rule "lib",
27 target file,
28 set "CXXFLAGS" += "-I. -fPIC",
29 input filesIn("src") filter regexp("^.*\\.cpp$")
30
31#"libbu++.so":
32# rule "so",
33# target file,
34# set "CXXFLAGS" += "-I. -fPIC",
35# set "LDFLAGS" += "-lpthread -lbz2",
36# input filesIn("src") filter regexp("^.*\\.cpp$")
37
38
39directoriesIn("src/tests","tests/"):
40 rule "exe",
41 target file,
42 group "tests",
43 requires "libbu++.a",
44 set "CXXFLAGS" += "-I.",
45 set "LDFLAGS" += "-L. -lbu++",
46 input filesIn("{fulldir}") filter regexp("^.*\\.cpp$")
47
48filesIn("src/tests") filter regexp("^src/tests/(.*)\\.cpp$", "tests/{re:1}"):
49 rule "exe",
50 target file,
51 group "tests",
52 requires "libbu++.a",
53 set "CXXFLAGS" += "-I.",
54 set "LDFLAGS" += "-L. -lbu++",
55 input "src/{target}.cpp"
56
57filesIn("src/tools") filter regexp("^src/tools/(.*)\\.cpp$", "{re:1}"):
58 rule "exe",
59 target file,
60 group "tools",
61 requires "libbu++.a",
62 set "CXXFLAGS" += "-I.",
63 set "LDFLAGS" += "-L. -lbu++",
64 input "src/tools/{target}.cpp"
65
66["tests/itoqueue1", "tests/itoqueue2", "tests/socketblock", "tests/itoserver",
67 "tests/itoheap"]:
68 set "LDFLAGS" += "-lpthread"
69
70filesIn("src/unit") filter regexp("^src/unit/(.*)\\.unit$", "unit/{re:1}"):
71 rule "exe",
72 target file,
73 group "tests",
74 group "unit",
75 requires "libbu++.a",
76 set "CXXFLAGS" += "-I.",
77 set "LDFLAGS" += "-L. -lbu++",
78 input "src/{target}.unit"
79
80"tests/plugin": set "LDFLAGS" += "-ldl"
81
82"tests/bzip2": set "LDFLAGS" += "-lbz2"
83
84rule "exe":
85 matches regexp("(.*)\\.o$"),
86 aggregate toString(" "),
87 perform command("g++ -o {target} {match} {LDFLAGS}")
88
89rule "lib":
90 matches regexp("(.*)\\.o$"),
91 aggregate toString(" "),
92 perform command("ar cr {target} {match}")
93
94rule "so":
95 matches regexp("(.*)\\.o$"),
96 aggregate toString(" "),
97 perform command("g++ -shared -o {target} {match} {LDFLAGS}")
98# perform command("ld -G -o {target} {match}")
99
100rule "cpp":
101 matches regexp("(.*)\\.cpp$"),
102 produces "{re:1}.o",
103 requires commandToList("g++ -M {CXXFLAGS} {match}", "make"),
104 perform command("g++ {CXXFLAGS} -c -o {target} {match}")
105
106rule "unit":
107 matches regexp("(.*)\\.unit$"),
108 produces "{re:1}.cpp",
109 requires "mkunit.sh",
110 perform command("./mkunit.sh \"{match}\" \"{target}\"")
111
112rule "hln":
113 matches regexp("src/(.*)\\.h"),
114 produces "bu/{re:1}.h",
115 perform command("ln -s ../src/{re:1}.h {target}")
116