diff -pruN a/Makefile b/Makefile
--- a/Makefile 2012-03-11 19:41:34.000000000 -0300
+++ b/Makefile 2012-07-05 21:02:19.380557317 -0300
@@ -25,7 +25,8 @@ all:
CFLAGS = -W -Wall -std=c99 -pedantic -O2 $(COPT)
MAC_SHARED = -flat_namespace -bundle -undefined suppress
LINFLAGS = -ldl -pthread $(CFLAGS)
-LIB = _$(PROG).so
+LIB = lib$(PROG).so
+SONAME = $(LIB).$(SOVER)
CC = g++
# Make sure that the compiler flags come last in the compilation string.
@@ -33,7 +34,8 @@ CC = g++
# "-Wl,--as-needed" turned on by default in cc command.
# Also, this is turned in many other distros in static linkage builds.
linux:
- $(CC) mongoose.c -shared -fPIC -fpic -o $(LIB) $(LINFLAGS)
+ $(CC) mongoose.c -shared -fPIC -fpic -Wl,-soname,$(SONAME) \
+ -o $(LIB).$(VER) $(LINFLAGS)
$(CC) mongoose.c main.c -o $(PROG) $(LINFLAGS)
bsd: