Fixed rpath shenanigans on OS X.
This commit is contained in:
parent
c095d80098
commit
33d4217450
|
@ -17,7 +17,12 @@ ifeq ($(TOOLCHAIN),gcc)
|
|||
LDFLAGS += -L$(OUTDIR) -lui
|
||||
# tell the dynamic loader to search in the executable path for shared objects
|
||||
# note: OS X's linker complains if we say -rpath= instead of -rpath,
|
||||
LDFLAGS += -Wl,-rpath,'$$ORIGIN'
|
||||
# also note that OS X doesn't use $ORIGIN - see http://jorgen.tjer.no/post/2014/05/20/dt-rpath-ld-and-at-rpath-dyld/
|
||||
ifeq ($(OS),darwin)
|
||||
LDFLAGS += -Wl,-rpath,@executable_path
|
||||
else
|
||||
LDFLAGS += -Wl,-rpath,'$$ORIGIN'
|
||||
endif
|
||||
else
|
||||
# TODO is there an equivalent to -L?
|
||||
LDFLAGS += $(OUTDIR)/libui.lib
|
||||
|
|
|
@ -60,6 +60,7 @@ LDFLAGS += \
|
|||
# fortunately, we don't need any; Apple's linker warns about undefined symbols in -shared builds!
|
||||
|
||||
# flags for setting soname
|
||||
# note the explicit need for @rpath
|
||||
# TODO -current_version, -compatibility_version
|
||||
LDFLAGS += \
|
||||
-Wl,-install_name,$(NAME).$(SOVERSION)$(SUFFIX)
|
||||
-Wl,-install_name,@rpath/$(NAME).$(SOVERSION)$(SUFFIX)
|
||||
|
|
Loading…
Reference in New Issue