]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
make: add -rpath when linking to find libkres
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 1 Aug 2017 11:23:38 +0000 (13:23 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 1 Aug 2017 11:26:33 +0000 (13:26 +0200)
... even if LIBDIR isn't on a standard place.

config.mk
doc/build.rst

index 026df4019951628d734db9fc046a5cdcba486e76..c4fd8b43f02f471e0c34d087d13f74f2c270da9d 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -28,7 +28,7 @@ XXD_LUA := ./scripts/embed-lua.sh
 INSTALL := install
 
 # Flags
-BUILD_LDFLAGS += $(LDFLAGS)
+BUILD_LDFLAGS += "-Wl,-rpath=$(LIBDIR)" $(LDFLAGS)
 BUILD_CFLAGS := $(CFLAGS) -std=c99 -D_GNU_SOURCE -Wno-unused -Wtype-limits -Wformat -Wformat-security -Wall -I$(abspath .) -I$(abspath lib/generic) -I$(abspath contrib) -I$(abspath contrib/lmdb)
 BUILD_CFLAGS += -DPACKAGE_VERSION="\"$(VERSION)\"" -DPREFIX="\"$(PREFIX)\"" -DMODULEDIR="\"$(MODULEDIR)\""
 ifeq (,$(findstring -O,$(CFLAGS)))
index 56264ea85b6ed46f9cac331f91dc1157c1dce0b7..6b8275989bb83a283208e9868182287d67fa1743 100644 (file)
@@ -125,12 +125,6 @@ When you have all the dependencies ready, you can build and install.
     Production code should be compiled with ``-DNDEBUG``.
     If you build the binary with ``-DNOVERBOSELOG``, it won't be possible to turn on verbose logging; we advise packagers against using that flag.
 
-.. note:: If you build with ``PREFIX``, you may need to also set the ``LDFLAGS`` for the libraries:
-
-.. code-block:: bash
-
-   make LDFLAGS="-Wl,-rpath=/usr/local/lib" PREFIX="/usr/local"
-
 Alternatively you can build only specific parts of the project, i.e. ``library``.
 
 .. code-block:: bash