From: Howard Chu Date: Wed, 1 Oct 2014 20:00:03 +0000 (+0100) Subject: Don't use -fPIC for static lib X-Git-Tag: LMDB_0.9.15~63 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=20ad21dcc4c3d0b01ea1e638e397fa451ce7b966;p=openldap Don't use -fPIC for static lib --- diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile index 25c1095466..97b571747d 100644 --- a/libraries/liblmdb/Makefile +++ b/libraries/liblmdb/Makefile @@ -50,9 +50,9 @@ test: all liblmdb.a: mdb.o midl.o ar rs $@ mdb.o midl.o -liblmdb.so: mdb.o midl.o +liblmdb.so: mdb.lo midl.lo # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) - $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.o midl.o $(SOLIBS) + $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) mdb_stat: mdb_stat.o liblmdb.a mdb_copy: mdb_copy.o liblmdb.a @@ -66,10 +66,16 @@ mtest5: mtest5.o liblmdb.a mtest6: mtest6.o liblmdb.a mdb.o: mdb.c lmdb.h midl.h - $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c midl.o: midl.c midl.h - $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c midl.c + +mdb.lo: mdb.c lmdb.h midl.h + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c -o $@ + +midl.lo: midl.c midl.h + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@ %: %.o $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@