$OpenBSD: patch-make_linux_Makefile,v 1.6 2011/03/12 21:16:42 jakemsr Exp $ --- make/linux/Makefile.orig Sun Feb 27 00:45:11 2011 +++ make/linux/Makefile Sun Feb 27 00:46:43 2011 @@ -48,8 +48,7 @@ LIBS= # Names LIBRARY=libebml.a -LIBRARY_SO=libebml.so -LIBRARY_SO_VER=libebml.so.3 +LIBRARY_SO_VER=libebml.so.${LIBebml_VERSION} # source-files sources:=$(wildcard ${SRC_DIR}*$(EXTENSION)) @@ -73,7 +72,7 @@ endif staticlib: $(LIBRARY) -sharedlib: $(LIBRARY_SO) +sharedlib: $(LIBRARY_SO_VER) lib: @echo "Use the 'staticlib', 'sharedlib' or 'all' targets." @@ -90,15 +89,12 @@ $(LIBRARY): $(objects) $(AR) rcvu $@ $(objects) $(RANLIB) $@ -$(LIBRARY_SO): $(objects_so) - $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) - rm -f $(LIBRARY_SO) - ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO) +$(LIBRARY_SO_VER): $(objects_so) + $(CXX) -shared -fPIC -o $(LIBRARY_SO_VER) $(objects_so) clean: rm -f $(objects) $(objects_so) rm -f $(LIBRARY) - rm -f $(LIBRARY_SO) rm -f $(LIBRARY_SO_VER) rm -f CORE @@ -135,10 +131,9 @@ install_staticlib: $(LIBRARY) $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir) $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir) -install_sharedlib: $(LIBRARY_SO) +install_sharedlib: $(LIBRARY_SO_VER) $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir) $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir) - ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO) ifneq ($(wildcard .depend),)