From 75e487d82390580614b6a36f642b14f5860f1d98 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 26 Jun 2009 16:59:24 +0000 Subject: 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. --- build.conf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'build.conf') diff --git a/build.conf b/build.conf index 9094c7a..5117d8d 100644 --- a/build.conf +++ b/build.conf @@ -5,7 +5,7 @@ # This file is part of the libbu++ library and is released under the # terms of the license contained in the file LICENSE. -default action: check group "lnhdrs", check "libbu++.a", check group "tools" +default action: check group "lnhdrs", check "libbu++.a", check "libbu++.so", check group "tools" "tests" action: check group "lnhdrs", check group "tests" "all" action: check group "lnhdrs", check targets() @@ -27,6 +27,14 @@ filesIn("src") filter regexp("^src/(.*)\\.h$", "bu/{re:1}.h"): set "CXXFLAGS" += "-I. -fPIC", input filesIn("src") filter regexp("^.*\\.cpp$") +"libbu++.so": + rule "so", + target file, + set "CXXFLAGS" += "-I. -fPIC", + set "LDFLAGS" += "-lpthread -lbz2", + input filesIn("src") filter regexp("^.*\\.cpp$") + + directoriesIn("src/tests","tests/"): rule "exe", target file, @@ -82,6 +90,12 @@ rule "lib": aggregate toString(" "), perform command("ar cr {target} {match}") +rule "so": + matches regexp("(.*)\\.o$"), + aggregate toString(" "), + perform command("g++ -shared -o {target} {match} {LDFLAGS}") +# perform command("ld -G -o {target} {match}") + rule "cpp": matches regexp("(.*)\\.cpp$"), produces "{re:1}.o", -- cgit v1.2.3