1 --- openldap-LMDB_0.9.32/libraries/liblmdb/Makefile.orig 2024-01-29 19:20:26.000000000 +0100
2 +++ openldap-LMDB_0.9.32/libraries/liblmdb/Makefile 2024-02-01 08:56:41.845326495 +0100
4 # There may be other macros in mdb.c of interest. You should
5 # read mdb.c before changing any of them.
9 W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
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 ########################################################################
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
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
42 rm -rf testdb && mkdir testdb
43 - ./mtest && ./mdb_stat testdb
44 + LD_LIBRARY_PATH=. ./mtest && LD_LIBRARY_PATH=. ./mdb_stat testdb
46 liblmdb.a: mdb.o midl.o
47 $(AR) rs $@ mdb.o midl.o
49 -liblmdb$(SOEXT): mdb.lo midl.lo
50 +liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
51 # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
52 - $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
53 + $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION)$(SOEXT)
55 -mdb_stat: mdb_stat.o liblmdb.a
56 -mdb_copy: mdb_copy.o liblmdb.a
57 -mdb_dump: mdb_dump.o liblmdb.a
58 -mdb_load: mdb_load.o liblmdb.a
59 -mtest: mtest.o liblmdb.a
60 -mtest2: mtest2.o liblmdb.a
61 -mtest3: mtest3.o liblmdb.a
62 -mtest4: mtest4.o liblmdb.a
63 -mtest5: mtest5.o liblmdb.a
64 -mtest6: mtest6.o liblmdb.a
65 -mplay: mplay.o liblmdb.a
78 mdb.o: mdb.c lmdb.h midl.h
79 $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
81 midl.lo: midl.c midl.h
82 $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@
85 - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
86 +%: %.o | liblmdb-$(SOVERSION)$(SOEXT)
87 + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -L. -llmdb-$(SOVERSION) -o $@
90 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<