Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use install_name instead of soname on MacOS
  • Loading branch information
JohnAZoidberg committed Jul 6, 2019
1 parent aace13a commit 6c149e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Makefile
Expand Up @@ -36,6 +36,11 @@ VERSION=2.0.0
OBJECTS=orcania.o memory.o base64.o
LIBS=-lc -lm

SONAME = -soname
ifeq ($(shell uname -s),Darwin)
SONAME = -install_name
endif

ifdef STRSTRFLAG
STRSTR=1
else
Expand Down Expand Up @@ -70,7 +75,7 @@ $(PKGCONFIG_FILE):
@sed -i -e 's/@PKGCONF_REQ_PRIVATE@/$(PKGCONF_REQ_PRIVATE)/g' $(PKGCONFIG_FILE)

liborcania.so: $(OBJECTS)
$(CC) -shared -fPIC -Wl,-soname,$(OUTPUT) -o $(OUTPUT).$(VERSION) $(OBJECTS) $(LIBS) $(LDFLAGS)
$(CC) -shared -fPIC -Wl,$(SONAME),$(OUTPUT) -o $(OUTPUT).$(VERSION) $(OBJECTS) $(LIBS) $(LDFLAGS)
ln -sf $(OUTPUT).$(VERSION) $(OUTPUT)

liborcania.a: $(OBJECTS)
Expand Down

0 comments on commit 6c149e9

Please sign in to comment.