Skip to content

Commit

Permalink
Use -install_name rather than -soname on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Torres committed Nov 25, 2015
1 parent ed39f34 commit 1ef5e5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 $^
Expand Down

0 comments on commit 1ef5e5a

Please sign in to comment.