diff options
-rw-r--r-- | build.conf | 16 | ||||
-rwxr-xr-x | checkinst.sh | 10 | ||||
-rw-r--r-- | src/buffer.cpp | 20 |
3 files changed, 45 insertions, 1 deletions
@@ -5,7 +5,7 @@ | |||
5 | # This file is part of the libbu++ library and is released under the | 5 | # This file is part of the libbu++ library and is released under the |
6 | # terms of the license contained in the file LICENSE. | 6 | # terms of the license contained in the file LICENSE. |
7 | 7 | ||
8 | default action: check group "lnhdrs", check "libbu++.a", check group "tools" | 8 | default action: check group "lnhdrs", check "libbu++.a", check "libbu++.so", check group "tools" |
9 | "tests" action: check group "lnhdrs", check group "tests" | 9 | "tests" action: check group "lnhdrs", check group "tests" |
10 | "all" action: check group "lnhdrs", check targets() | 10 | "all" action: check group "lnhdrs", check targets() |
11 | 11 | ||
@@ -27,6 +27,14 @@ filesIn("src") filter regexp("^src/(.*)\\.h$", "bu/{re:1}.h"): | |||
27 | set "CXXFLAGS" += "-I. -fPIC", | 27 | set "CXXFLAGS" += "-I. -fPIC", |
28 | input filesIn("src") filter regexp("^.*\\.cpp$") | 28 | input filesIn("src") filter regexp("^.*\\.cpp$") |
29 | 29 | ||
30 | "libbu++.so": | ||
31 | rule "so", | ||
32 | target file, | ||
33 | set "CXXFLAGS" += "-I. -fPIC", | ||
34 | set "LDFLAGS" += "-lpthread -lbz2", | ||
35 | input filesIn("src") filter regexp("^.*\\.cpp$") | ||
36 | |||
37 | |||
30 | directoriesIn("src/tests","tests/"): | 38 | directoriesIn("src/tests","tests/"): |
31 | rule "exe", | 39 | rule "exe", |
32 | target file, | 40 | target file, |
@@ -82,6 +90,12 @@ rule "lib": | |||
82 | aggregate toString(" "), | 90 | aggregate toString(" "), |
83 | perform command("ar cr {target} {match}") | 91 | perform command("ar cr {target} {match}") |
84 | 92 | ||
93 | rule "so": | ||
94 | matches regexp("(.*)\\.o$"), | ||
95 | aggregate toString(" "), | ||
96 | perform command("g++ -shared -o {target} {match} {LDFLAGS}") | ||
97 | # perform command("ld -G -o {target} {match}") | ||
98 | |||
85 | rule "cpp": | 99 | rule "cpp": |
86 | matches regexp("(.*)\\.cpp$"), | 100 | matches regexp("(.*)\\.cpp$"), |
87 | produces "{re:1}.o", | 101 | produces "{re:1}.o", |
diff --git a/checkinst.sh b/checkinst.sh new file mode 100755 index 0000000..957267c --- /dev/null +++ b/checkinst.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | CMD="ln -svf $PWD/libbu++.so /usr/lib; ln -svf $PWD/bu /usr/include" | ||
4 | |||
5 | if [ $UID == 0 ]; then | ||
6 | bash -c "$CMD" | ||
7 | else | ||
8 | echo This script needs root access... | ||
9 | su root -c "$CMD" | ||
10 | fi | ||
diff --git a/src/buffer.cpp b/src/buffer.cpp index abb4fed..fef64b1 100644 --- a/src/buffer.cpp +++ b/src/buffer.cpp | |||
@@ -15,3 +15,23 @@ Bu::Buffer::~Buffer() | |||
15 | { | 15 | { |
16 | } | 16 | } |
17 | 17 | ||
18 | void Bu::Buffer::start() | ||
19 | { | ||
20 | } | ||
21 | |||
22 | size_t Bu::Buffer::stop() | ||
23 | { | ||
24 | } | ||
25 | |||
26 | size_t Bu::Buffer::read( void *pBuf, size_t nBytes ) | ||
27 | { | ||
28 | } | ||
29 | |||
30 | size_t Bu::Buffer::write( const void *pBuf, size_t nBytes ) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | void Bu::Buffer::flush() | ||
35 | { | ||
36 | } | ||
37 | |||