libunibreak: update to 5.1 and add test results
[oi-userland.git] / components / database / lmdb / patches / 01-Makefile.patch
blob5845a262c13f3b66a30d70626dd1c6258ca72264
1 --- lmdb-LMDB_0.9.23/libraries/liblmdb/Makefile 2019-01-24 06:48:44.393091156 +0000
2 +++ lmdb-LMDB_0.9.23/libraries/liblmdb/Makefile 2019-01-24 08:25:21.037887427 +0000
3 @@ -18,7 +18,6 @@
4 # There may be other macros in mdb.c of interest. You should
5 # read mdb.c before changing any of them.
7 -CC = gcc
8 AR = ar
9 W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
10 THREADS = -pthread
11 @@ -27,18 +26,11 @@
12 LDLIBS =
13 SOLIBS =
14 SOEXT = .so
15 -prefix = /usr/local
16 -exec_prefix = $(prefix)
17 -bindir = $(exec_prefix)/bin
18 -libdir = $(exec_prefix)/lib
19 -includedir = $(prefix)/include
20 -datarootdir = $(prefix)/share
21 -mandir = $(datarootdir)/man
23 ########################################################################
25 IHDRS = lmdb.h
26 -ILIBS = liblmdb.a liblmdb$(SOEXT)
27 +ILIBS = liblmdb-$(SOVERSION)$(SOEXT)
28 IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
29 IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
30 PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
31 @@ -51,33 +43,34 @@
32 mkdir -p $(DESTDIR)$(mandir)/man1
33 for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
34 for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
35 + ln -sf ./liblmdb-$(SOVERSION)$(SOEXT) $(DESTDIR)$(libdir)/liblmdb$(SOEXT)
36 for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
37 for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
39 clean:
40 rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
42 -test: all
43 +test: all
44 rm -rf testdb && mkdir testdb
45 - ./mtest && ./mdb_stat testdb
46 + LD_LIBRARY_PATH=. ./mtest && LD_LIBRARY_PATH=. ./mdb_stat testdb
48 liblmdb.a: mdb.o midl.o
49 $(AR) rs $@ mdb.o midl.o
51 -liblmdb$(SOEXT): mdb.lo midl.lo
52 +liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
53 # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
54 - $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
55 + $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION)$(SOEXT)
57 -mdb_stat: mdb_stat.o liblmdb.a
58 -mdb_copy: mdb_copy.o liblmdb.a
59 -mdb_dump: mdb_dump.o liblmdb.a
60 -mdb_load: mdb_load.o liblmdb.a
61 -mtest: mtest.o liblmdb.a
62 -mtest2: mtest2.o liblmdb.a
63 -mtest3: mtest3.o liblmdb.a
64 -mtest4: mtest4.o liblmdb.a
65 -mtest5: mtest5.o liblmdb.a
66 -mtest6: mtest6.o liblmdb.a
67 +mdb_stat: mdb_stat.o
68 +mdb_copy: mdb_copy.o
69 +mdb_dump: mdb_dump.o
70 +mdb_load: mdb_load.o
71 +mtest: mtest.o
72 +mtest2: mtest2.o
73 +mtest3: mtest3.o
74 +mtest4: mtest4.o
75 +mtest5: mtest5.o
76 +mtest6: mtest6.o
78 mdb.o: mdb.c lmdb.h midl.h
79 $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
80 @@ -91,8 +84,8 @@
81 midl.lo: midl.c midl.h
82 $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@
84 -%: %.o
85 - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
86 +%: %.o | liblmdb-$(SOVERSION)$(SOEXT)
87 + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -L. -llmdb-$(SOVERSION) -o $@
89 %.o: %.c lmdb.h
90 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<