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: https://github.com/nodejs/http-parser/issues/356
PR-URL: https://github.com/nodejs/http-parser/pull/358
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
make-http-max-header-size-gyp-configurable
Fabian Groffen 8 years ago committed by Ben Noordhuis
parent 89279ab613
commit fd3850c048

@ -65,7 +65,9 @@ PREFIX ?= $(DESTDIR)/usr/local
LIBDIR = $(PREFIX)/lib
INCLUDEDIR = $(PREFIX)/include
ifneq (darwin,$(PLATFORM))
ifeq (darwin,$(PLATFORM))
LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
else
# TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
LDFLAGS_LIB += -Wl,-soname=$(SONAME)
endif

Loading…
Cancel
Save