Skip to content

Commit

Permalink
README.md: update build documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zinccyy committed Feb 13, 2023
1 parent 4f490cf commit 644c892
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ Besides the usual C development environment, the following additional dependenci

First clone the repository:

```sh
# clone recursively to also clone uthash library
$ git clone https://github.com/telekom/sysrepo-plugin-interfaces --recursive
```
$ git clone https://github.com/telekom/sysrepo-plugin-interfaces
$ git submodule init
$ git submodule update
```

Next, create a build directory and generate the build recipes using CMake:
Expand All @@ -66,18 +67,19 @@ For example, to build only the routing plugin the following command should be ex
$ cmake -DINTERFACES_PLUGIN=OFF ..
```

The default configuration builds the plugins as stand-alone foreground applications.
To build the plugins as shared object files for use with `sysrepo-plugind`, run the following instead:
Lastly, invoke the build and install using `make`:

```
$ cmake -DPLUGIN=ON ..
$ make -j$(nproc)
```

Lastly, invoke the build and install using `make`:
### Build artifacts

```
$ make -j$(nproc) install
```
Plugin will be built as a standalone application and also as a `sysrepo-plugind` module. For example, for the ietf-interfaces plugin there are two build artifacts:
- **ietf-interfaces-plugin**: standalone application
- **libsrplg-ietf-interfaces.so**: `sysrepo-plugind` module which exposes the plugin init and cleanup callbacks and can be installed by invoking the following command: `sysrepo-plugind -P libsrplg-ietf-interfaces.so`

### Sysrepo/YANG requirements

The plugins require several YANG modules to be loaded into the Sysrepo datastore and several features need to be enabled.
For the interfaces plugin this can be achieved by invoking the following commands:
Expand Down

0 comments on commit 644c892

Please sign in to comment.