Skip to content
This repository was archived by the owner on Nov 6, 2022. It is now read-only.

Commit fd3850c

Browse files
grobianbnoordhuis
authored andcommitted
Makefile: set install_name on macos
install_name on Mach-O is similar to SONAME on ELF, except that it needs a full path instead of just the basename. Fixes: #356 PR-URL: #358 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 89279ab commit fd3850c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ PREFIX ?= $(DESTDIR)/usr/local
6565
LIBDIR = $(PREFIX)/lib
6666
INCLUDEDIR = $(PREFIX)/include
6767

68-
ifneq (darwin,$(PLATFORM))
68+
ifeq (darwin,$(PLATFORM))
69+
LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
70+
else
6971
# TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
7072
LDFLAGS_LIB += -Wl,-soname=$(SONAME)
7173
endif

0 commit comments

Comments
 (0)