summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Leukkunen <lle@rahina.org>2007-05-25 00:47:25 +0300
committerLauri Leukkunen <lle@rahina.org>2007-05-25 00:47:25 +0300
commite7d50001a7be6e5fda37a1378e956ca01f6eab73 (patch)
tree3180a442f1f5e7d3bae279be3dfbc6859b7887a4
parent52c128922c6ad78e5503307e0fba763c56c2c7bf (diff)
Produce libsb2.so with SONAME in place1.99.0.5
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
-rw-r--r--.gitignore2
-rw-r--r--Makefile6
-rw-r--r--llbuild/Makefile.include2
-rw-r--r--preload/Makefile14
-rwxr-xr-xutils/sb22
5 files changed, 14 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index a003d2f..5f10a68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
*.o
.*.d
-*.so
+*.so*
.*.swp
*.*~
config.log
diff --git a/Makefile b/Makefile
index 8732675..6ac9959 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
CC = gcc
CXX = g++
LD = ld
-PACKAGE_VERSION = "1.99.0.3"
+PACKAGE_VERSION = "1.99.0.5"
PACKAGE = "SB2"
+LIBSB2_SONAME = "libsb2.so.1"
CFLAGS = -O2 -g -Wall -W -I./include -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
CFLAGS += -DSCRATCHBOX_ROOT="$(prefix)"
CXXFLAGS =
@@ -43,7 +44,7 @@ install: $(targets)
install -d -m 755 $(prefix)/share/scratchbox2/redir_scripts/preload/default
install -d -m 755 $(prefix)/share/scratchbox2/redir_scripts/preload/emulate
install -d -m 755 $(prefix)/share/man/man1
- install -c -m 755 preload/libsb2.so $(prefix)/lib/libsb2.so
+ install -c -m 755 preload/libsb2.so.$(PACKAGE_VERSION) $(prefix)/lib/libsb2.so.$(PACKAGE_VERSION)
install -c -m 755 utils/sb2 $(prefix)/bin/sb2
install -c -m 755 utils/sb2-init $(prefix)/bin/sb2-init
install -c -m 755 utils/sb2-build-libtool $(prefix)/bin/sb2-build-libtool
@@ -59,6 +60,7 @@ install: $(targets)
done
rm -f $(prefix)/share/scratchbox2/host_usr
ln -sf /usr $(prefix)/share/scratchbox2/host_usr
+ /sbin/ldconfig -n $(prefix)/lib
CLEAN_FILES = $(targets) config.status config.log
diff --git a/llbuild/Makefile.include b/llbuild/Makefile.include
index 4abb2c2..0d4f108 100644
--- a/llbuild/Makefile.include
+++ b/llbuild/Makefile.include
@@ -79,7 +79,7 @@ endef
define llbuild_link_shlib
@run_sources="$^"; \
run_target="$@"; \
- run_cmd="$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LIBS)"; \
+ run_cmd="$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$(1) -o $@ $^ $(LIBS)"; \
run_alias="SHLIB"; \
$(ll_pretty_run)
endef
diff --git a/preload/Makefile b/preload/Makefile
index 77181ae..e0ee8f8 100644
--- a/preload/Makefile
+++ b/preload/Makefile
@@ -1,14 +1,14 @@
objs := libsb2.o libsb_env.o sb_exec.o
-preload/libsb2.so: $(call llep,$(objs))
- $(llbuild_link_shlib)
+preload/libsb2.so.$(PACKAGE_VERSION): $(call llep,$(objs))
+ $(call llbuild_link_shlib,$(LIBSB2_SONAME))
-preload/libsb2.so: mapping/libmapping.a
+preload/libsb2.so.$(PACKAGE_VERSION): mapping/libmapping.a
-preload/libsb2.so: CFLAGS := $(CFLAGS) -fPIC -Wall -W
-preload/libsb2.so: LDFLAGS := $(LDFLAGS)
-preload/libsb2.so: LIBS := -ldl -lm -lpthread -lrt
+preload/libsb2.so.$(PACKAGE_VERSION): CFLAGS := $(CFLAGS) -fPIC -Wall -W
+preload/libsb2.so.$(PACKAGE_VERSION): LDFLAGS := $(LDFLAGS)
+preload/libsb2.so.$(PACKAGE_VERSION): LIBS := -ldl -lm -lpthread -lrt
-targets += preload/libsb2.so
+targets += preload/libsb2.so.$(PACKAGE_VERSION)
diff --git a/utils/sb2 b/utils/sb2
index c6e1b0e..509a719 100755
--- a/utils/sb2
+++ b/utils/sb2
@@ -74,7 +74,7 @@ function sboxify_environment()
if [ -n "$SBOX_DIR" ]; then
- SBOX_LIBSB2="$SBOX_DIR/lib/libsb2.so"
+ SBOX_LIBSB2="$SBOX_DIR/lib/libsb2.so.1"
if [ -z "$SBOX_REDIR_SCRIPTS" ]; then
SBOX_REDIR_SCRIPTS="$SBOX_DIR/share/scratchbox2/redir_scripts"
fi