|
|
5d3557 |
diff -up lmdb-LMDB_0.9.19/libraries/liblmdb/Makefile.orig lmdb-LMDB_0.9.19/libraries/liblmdb/Makefile
|
|
|
5d3557 |
--- lmdb-LMDB_0.9.19/libraries/liblmdb/Makefile.orig 2017-01-04 12:14:24.303344915 +0100
|
|
|
5d3557 |
+++ lmdb-LMDB_0.9.19/libraries/liblmdb/Makefile 2017-01-04 12:19:20.190295319 +0100
|
|
|
5d3557 |
@@ -26,6 +26,7 @@ OPT = -O2 -g
|
|
|
5d3557 |
CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
|
|
|
5d3557 |
LDLIBS =
|
|
|
5d3557 |
SOLIBS =
|
|
|
5d3557 |
+SOVERSION = 0.0.0
|
|
|
5d3557 |
SOEXT = .so
|
|
|
5d3557 |
prefix = /usr/local
|
|
|
5d3557 |
exec_prefix = $(prefix)
|
|
|
5d3557 |
@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
|
|
|
5d3557 |
########################################################################
|
|
|
5d3557 |
|
|
|
5d3557 |
IHDRS = lmdb.h
|
|
|
5d3557 |
-ILIBS = liblmdb.a liblmdb$(SOEXT)
|
|
|
5d3557 |
+ILIBS = liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION)
|
|
|
5d3557 |
IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
|
|
|
5d3557 |
IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
|
|
|
5d3557 |
PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
|
|
|
5d3557 |
@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
|
|
|
5d3557 |
mkdir -p $(DESTDIR)$(libdir)
|
|
|
5d3557 |
mkdir -p $(DESTDIR)$(includedir)
|
|
|
5d3557 |
mkdir -p $(DESTDIR)$(mandir)/man1
|
|
|
5d3557 |
- for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
|
|
|
5d3557 |
- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
|
|
|
5d3557 |
- for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
|
|
|
5d3557 |
- for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
|
|
|
5d3557 |
+ for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
|
|
|
5d3557 |
+ for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
|
|
|
5d3557 |
+ for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
|
|
|
5d3557 |
+ for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
|
|
|
5d3557 |
|
|
|
5d3557 |
clean:
|
|
|
5d3557 |
- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
|
|
|
5d3557 |
+ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
|
|
|
5d3557 |
|
|
|
5d3557 |
test: all
|
|
|
5d3557 |
rm -rf testdb && mkdir testdb
|
|
|
5d3557 |
@@ -64,20 +65,24 @@ test: all
|
|
|
5d3557 |
liblmdb.a: mdb.o midl.o
|
|
|
5d3557 |
$(AR) rs $@ mdb.o midl.o
|
|
|
5d3557 |
|
|
|
5d3557 |
-liblmdb$(SOEXT): mdb.lo midl.lo
|
|
|
5d3557 |
+liblmdb$(SOEXT): liblmdb$(SOEXT).$(SOVERSION)
|
|
|
5d3557 |
+ rm -f $@
|
|
|
5d3557 |
+ ln -s $< $@
|
|
|
5d3557 |
+
|
|
|
5d3557 |
+liblmdb$(SOEXT).$(SOVERSION): mdb.lo midl.lo
|
|
|
5d3557 |
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
|
|
5d3557 |
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
|
|
|
5d3557 |
+ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)
|
|
|
5d3557 |
|
|
|
5d3557 |
-mdb_stat: mdb_stat.o liblmdb.a
|
|
|
5d3557 |
-mdb_copy: mdb_copy.o liblmdb.a
|
|
|
5d3557 |
-mdb_dump: mdb_dump.o liblmdb.a
|
|
|
5d3557 |
-mdb_load: mdb_load.o liblmdb.a
|
|
|
5d3557 |
-mtest: mtest.o liblmdb.a
|
|
|
5d3557 |
-mtest2: mtest2.o liblmdb.a
|
|
|
5d3557 |
-mtest3: mtest3.o liblmdb.a
|
|
|
5d3557 |
-mtest4: mtest4.o liblmdb.a
|
|
|
5d3557 |
-mtest5: mtest5.o liblmdb.a
|
|
|
5d3557 |
-mtest6: mtest6.o liblmdb.a
|
|
|
5d3557 |
+mdb_stat: mdb_stat.o liblmdb.so
|
|
|
5d3557 |
+mdb_copy: mdb_copy.o liblmdb.so
|
|
|
5d3557 |
+mdb_dump: mdb_dump.o liblmdb.so
|
|
|
5d3557 |
+mdb_load: mdb_load.o liblmdb.so
|
|
|
5d3557 |
+mtest: mtest.o liblmdb.so
|
|
|
5d3557 |
+mtest2: mtest2.o liblmdb.so
|
|
|
5d3557 |
+mtest3: mtest3.o liblmdb.so
|
|
|
5d3557 |
+mtest4: mtest4.o liblmdb.so
|
|
|
5d3557 |
+mtest5: mtest5.o liblmdb.so
|
|
|
5d3557 |
+mtest6: mtest6.o liblmdb.so
|
|
|
5d3557 |
|
|
|
5d3557 |
mdb.o: mdb.c lmdb.h midl.h
|
|
|
5d3557 |
$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
|