aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Makefile.local
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-04-14 16:16:05 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-04-14 16:16:05 -0700
commit1036867897c05215fa55863a10e5afdaef7dfd5d (patch)
tree87d4c184b381378b2e6a17318774bd1e73f8d8d7 /lib/Makefile.local
parent8c8079a8b14fac5e8ca6b682e5c76e08a824f2e7 (diff)
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
Diffstat (limited to 'lib/Makefile.local')
-rw-r--r--lib/Makefile.local6
1 files 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) $@