Skip to content

Commit

Permalink
Merge pull request hoedown#184 from hoedown/soname
Browse files Browse the repository at this point in the history
Use -install_name on Darwin
  • Loading branch information
mildsunrise committed Nov 25, 2015
2 parents ed39f34 + 1ef5e5a commit b234ae0
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 b234ae0

Please sign in to comment.