mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-31 21:30:36 +00:00
Make setting the RPATH optional.
When WITH_RPATH is set to no, the default RPATH to $ORIGIN/lib isn't set. This was requested in #523.
This commit is contained in:
parent
aa36dcad6c
commit
b48cc47465
1 changed files with 7 additions and 20 deletions
27
Makefile
27
Makefile
|
@ -36,7 +36,12 @@ WITH_CURL:=yes
|
|||
# installed
|
||||
WITH_OPENAL:=yes
|
||||
|
||||
# Enable systemwide installation of game assets
|
||||
# Sets an RPATH to $ORIGIN/lib. It can be used to
|
||||
# inject custom libraries, e.g. a patches libSDL.so
|
||||
# or libopenal.so. Not supported on Windows.
|
||||
WITH_RPATH:=yes
|
||||
|
||||
# Enable systemwide installation of game assets.
|
||||
WITH_SYSTEMWIDE:=no
|
||||
|
||||
# This will set the default SYSTEMDIR, a non-empty string
|
||||
|
@ -423,27 +428,9 @@ ifeq ($(YQ2_OSTYPE), FreeBSD)
|
|||
release/quake2 : LDFLAGS += -lexecinfo
|
||||
endif
|
||||
|
||||
ifeq ($(YQ2_OSTYPE), FreeBSD)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib' -lexecinfo
|
||||
else ifeq ($(YQ2_OSTYPE), Linux)
|
||||
ifeq ($(WITH_RPATH),yes)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SYSTEMWIDE),yes)
|
||||
ifneq ($(WITH_SYSTEMDIR),"")
|
||||
ifeq ($(YQ2_OSTYPE), FreeBSD)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$(WITH_SYSTEMDIR)/lib'
|
||||
else ifeq ($(YQ2_OSTYPE), Linux)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$(WITH_SYSTEMDIR)/lib'
|
||||
endif
|
||||
else
|
||||
ifeq ($(YQ2_OSTYPE), FreeBSD)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='/usr/share/games/quake2/lib'
|
||||
else ifeq ($(YQ2_OSTYPE), Linux)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='/usr/share/games/quake2/lib'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
|
Loading…
Reference in a new issue