Use -install_name rather than -soname on Darwin

Fixes #167.
This commit is contained in:
Devin Torres 2015-11-24 23:19:46 -06:00
parent ed39f34264
commit 1ef5e5ac4b

View file

@ -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 $^