Commit a332b82e authored by Tomas Krizek's avatar Tomas Krizek

meson: doc/build - add info for packagers

parent 7ca16168
......@@ -178,35 +178,39 @@ above), use:
.. code-block:: bash
$ make PREFIX="/usr/local"
$ make install PREFIX="/usr/local"
.. note:: Always build with ``PREFIX`` if you want to install, as it is hardcoded in the executable for module search path.
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
$ make lib
$ make lib-install
.. note:: Documentation is not built by default, run ``make doc`` to build it.
Recommended switches for ``meson build_pkg``:
* ``--buildtype=release`` turns on optimalizations, turns off asserts (override
with ``-Db_ndebug=false`` if desired)
* ``--unity=on`` faster builds, see `Unity builds
* ``--prefix=/usr`` to customize
prefix, other directories can be set in a similar fashion, see ``meson setup
* ``-Dsystemd_unit_files=enabled`` for systemd unit files with socket activation
support. Alternately, for systemd < 227, use ``nosocket``. If you need to
customize unit files, use drop-in files.
* ``-Ddoc=enabled`` for offline html documentation
* ``-Dclient=enabled`` to force build of kresc
* ``-Dunit_tests=enabled`` to force build of unit tests
If the target distro has externally managed DNSSEC trust anchors or root hints:
* ``-Dkeyfile_default=/usr/share/dns/root.key``
* ``-Droot_hints=/usr/share/dns/root.hints``
In case you want to have automatically managed DNSSEC trust anchors instead,
set the following and make sure both ``root.keys`` (check default
``keyfile_default`` path in summary) and its parent directory will be writable
by kresd process.
* ``-Dmanaged_ta=enabled``
Building with security compiler flags
Knot Resolver enables certain `security compile-time flags <>`_ that do not affect performance.
You can add more flags to the build by appending them to `CFLAGS` variable, e.g. ``make CFLAGS="-fstack-protector"``.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment