Add $ORIGIN/lib the RPATH on FreeBSD and Linux

This should ease the overwriting of systemwide installed libs with
specialized versions. Also distributors may use this facility to supply
libraries next to the binaries. Maybe the same should be added for the
other platforms, but I'm not sure if and how they support RPATHes.
This commit is contained in:
Yamagi Burmeister 2013-11-09 13:47:04 +01:00
parent e7ac0653b2
commit dca3db9426

View file

@ -433,6 +433,12 @@ endif
ifneq ($(OSTYPE), Darwin)
release/quake2 : LDFLAGS += -lGL
endif
ifeq ($(OSTYPE), FreeBSD)
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
else ifeq ($(OSTYPE), Linux)
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
endif
endif
# ----------