e128169557
lmdb: fix soname generation
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
--- libraries/liblmdb/Makefile.orig 2016-09-11 13:49:25.425232271 +0400
|
|
+++ libraries/liblmdb/Makefile 2016-09-11 14:15:01.040383128 +0400
|
|
@@ -26,6 +26,8 @@
|
|
CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
|
|
LDLIBS =
|
|
SOLIBS =
|
|
+MAJOR = 0
|
|
+MINOR = 9
|
|
prefix = /usr/local
|
|
exec_prefix = $(prefix)
|
|
bindir = $(exec_prefix)/bin
|
|
@@ -49,12 +51,15 @@
|
|
mkdir -p $(DESTDIR)$(includedir)
|
|
mkdir -p $(DESTDIR)$(mandir)/man1
|
|
for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
|
|
- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
|
|
+ cp liblmdb.a $(DESTDIR)$(libdir)
|
|
+ cp liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
|
|
+ ln -s liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/liblmdb.so.$(MAJOR)
|
|
+ ln -s liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/liblmdb.so
|
|
for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
|
|
for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
|
|
|
|
clean:
|
|
- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
|
|
+ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
|
|
|
|
test: all
|
|
rm -rf testdb && mkdir testdb
|
|
@@ -65,7 +70,7 @@
|
|
|
|
liblmdb.so: mdb.lo midl.lo
|
|
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
|
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
|
|
+ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname=$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR) mdb.lo midl.lo $(SOLIBS)
|
|
|
|
mdb_stat: mdb_stat.o liblmdb.a
|
|
mdb_copy: mdb_copy.o liblmdb.a
|