Merge pull request #184 from hoedown/soname

Use -install_name on Darwin
This commit is contained in:
Xavier Mendez 2015-11-25 13:05:48 +01:00
commit b234ae0a46

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