File: building.rst

package info (click to toggle)
libgpiod 2.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,108 kB
  • sloc: ansic: 26,612; sh: 7,554; cpp: 4,944; python: 2,426; makefile: 811; xml: 49
file content (74 lines) | stat: -rw-r--r-- 2,049 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
   SPDX-License-Identifier: CC-BY-SA-4.0
   SPDX-FileCopyrightText: 2025 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

..
   This file is part of libgpiod.

Downloading, building & installing
==================================

Downloading
-----------

Libgpiod is packaged by several linux distributions. You should typically be
able to install it using your package manager. If you want to build libgpiod
from sources, the upstream git repository for libgpiod is hosted at
`kernel.org <https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/>`_.
together with
`release tarballs <https://mirrors.edge.kernel.org/pub/software/libs/libgpiod/>`_.

Building
--------

This is a pretty standard autotools project. The core C library does not have
any external dependencies other than the standard C library with GNU extensions.

The build system requires the following packages to be installed on the host
system for the basic build:

  * ``autotools``
  * ``autoconf-archive``
  * ``libtool``
  * ``pkg-config``

.. note::
   Development files for additional libraries may be required depending on
   selected options. The configure script will report any missing additional
   required dependencies.

To build the project (including command-line utilities) run:

.. code-block:: none

   ./autogen.sh --enable-tools=yes
   make

.. note::
   The command-line tools optionally depend on libedit for the interactive
   feature.

The autogen script will execute ``./configure`` and pass all the command-line
arguments to it.

.. note::
   If building from release tarballs, the configure script is already provided
   and there's no need to invoke autogen.sh.

For all configure features, see: ``./configure --help``.

Installing
----------

To install the project run:

.. code-block:: none

   make install

.. note::
   The above may require superuser privileges.

This will install libgpiod under the default system paths. If you want to
install it under non-standard path, pass the ``--prefix=<install path>``
option to ``configure``.