From 1ef5e5ac4b998916d18de1fb90de878224cf8ec2 Mon Sep 17 00:00:00 2001 From: Devin Torres Date: Tue, 24 Nov 2015 23:19:46 -0600 Subject: [PATCH] Use -install_name rather than -soname on Darwin Fixes #167. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75c3e26..ebfab0b 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,11 @@ ifneq ($(OS),Windows_NT) HOEDOWN_CFLAGS += -fPIC endif +SONAME = -soname +ifeq ($(shell uname -s),Darwin) + SONAME = -install_name +endif + HOEDOWN_SRC=\ src/autolink.o \ src/buffer.o \ @@ -30,7 +35,7 @@ libhoedown.so: libhoedown.so.3 ln -f -s $^ $@ libhoedown.so.3: $(HOEDOWN_SRC) - $(CC) -Wl,-soname,$(@F) -shared $^ $(LDFLAGS) -o $@ + $(CC) -Wl,$(SONAME),$(@F) -shared $^ $(LDFLAGS) -o $@ libhoedown.a: $(HOEDOWN_SRC) $(AR) rcs libhoedown.a $^