From 1036867897c05215fa55863a10e5afdaef7dfd5d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 14 Apr 2010 16:16:05 -0700 Subject: [PATCH] Makefile: Fix library linking command for OS X I'm not sure which system Aaron used, but on the machine I have access to, (Darwin 8.11.0), the -shared and -dylib_install_name options are not recognized. Instead I use -dynamic_lib and -install_name as documented here: http://www.finkproject.org/doc/porting/shared.php --- lib/Makefile.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Makefile.local b/lib/Makefile.local index f001e75b..1eb1f4ea 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -28,13 +28,13 @@ LIBRARY_SUFFIX = dylib LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX) SONAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIBRARY_SUFFIX) LIBNAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE).$(LIBRARY_SUFFIX) -LIBRARY_LINK_FLAG = -Wl,-dylib_install_name -Wl,$(SONAME) +LIBRARY_LINK_FLAG = -dynamiclib -install_name $(SONAME) else LIBRARY_SUFFIX = so LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX) SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR) LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE) -LIBRARY_LINK_FLAG = -Wl,-soname=$(SONAME) +LIBRARY_LINK_FLAG = -shared -Wl,-soname=$(SONAME) endif dir := lib @@ -63,7 +63,7 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules) $(call quiet,AR) rcs $@ $^ $(dir)/$(LIBNAME): $(libnotmuch_modules) - $(call quiet,CXX $(CXXFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -shared $(LIBRARY_LINK_FLAG) -o $@ + $(call quiet,CXX $(CXXFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ $(dir)/$(SONAME): $(dir)/$(LIBNAME) ln -sf $(LIBNAME) $@