aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-06-26 16:59:24 +0000
committerMike Buland <eichlan@xagasoft.com>2009-06-26 16:59:24 +0000
commit75e487d82390580614b6a36f642b14f5860f1d98 (patch)
treecc51a6a0e5fdba7131ca37e79fa9b0f18e4c64e9
parent158d215b33d5b5bf07f73bb7547aae1fb12593b3 (diff)
downloadlibbu++-75e487d82390580614b6a36f642b14f5860f1d98.tar.gz
libbu++-75e487d82390580614b6a36f642b14f5860f1d98.tar.bz2
libbu++-75e487d82390580614b6a36f642b14f5860f1d98.tar.xz
libbu++-75e487d82390580614b6a36f642b14f5860f1d98.zip
Fixed a couple of things up, now build creates a shared object as well as a non
shared, checkinst.sh makes sure that symlinks are in /usr/lib and /usr/include so that you don't need a libbu++ symlink in any directories. If you still want the static version, then just delete the shared object, or switch your link line to do this: -Wl,-Bstatic -lbu++ -Wl,-Bdynamic Instead of just -lbu++, it'll include libbu++ as static, and everything else as dynamic. You could always just use -static, but then the whole thing is going to be static. Also, the dynamic library is already linked against all the extra libs you need, so no need to link against pthread or libbz2.
-rw-r--r--build.conf16
-rwxr-xr-xcheckinst.sh10
-rw-r--r--src/buffer.cpp20
3 files changed, 45 insertions, 1 deletions
diff --git a/build.conf b/build.conf
index 9094c7a..5117d8d 100644
--- a/build.conf
+++ b/build.conf
@@ -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
8default action: check group "lnhdrs", check "libbu++.a", check group "tools" 8default 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
30directoriesIn("src/tests","tests/"): 38directoriesIn("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
93rule "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
85rule "cpp": 99rule "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
3CMD="ln -svf $PWD/libbu++.so /usr/lib; ln -svf $PWD/bu /usr/include"
4
5if [ $UID == 0 ]; then
6 bash -c "$CMD"
7else
8 echo This script needs root access...
9 su root -c "$CMD"
10fi
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
18void Bu::Buffer::start()
19{
20}
21
22size_t Bu::Buffer::stop()
23{
24}
25
26size_t Bu::Buffer::read( void *pBuf, size_t nBytes )
27{
28}
29
30size_t Bu::Buffer::write( const void *pBuf, size_t nBytes )
31{
32}
33
34void Bu::Buffer::flush()
35{
36}
37