We don't really need to build all the available rust crates here by
default, but only what's required by the libgpiod crate.
Currently we try to build gpiosim-sys crate as well, even if
"--enable-tests" isn't passed to autogen.sh, which results in following
build failure:
error: could not find native static library `gpiosim`, perhaps an -L flag is missing?
Fix this by building just the libgpiod crate instead, which can force
building of the other crates based on the enabled configuration options.
Reported-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
# SPDX-FileCopyrightText: 2022 Linaro Ltd.
# SPDX-FileCopyrightTest: 2022 Viresh Kumar <viresh.kumar@linaro.org>
-command = cargo build --release --lib
-
-if WITH_TESTS
-command += --tests
-endif
-
-if WITH_EXAMPLES
-command += --examples
-endif
-
-all:
- $(command)
-
-clean:
- cargo clean
-
EXTRA_DIST = Cargo.toml
-
SUBDIRS = gpiosim-sys libgpiod libgpiod-sys
# SPDX-FileCopyrightText: 2022 Linaro Ltd.
# SPDX-FileCopyrightTest: 2022 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+command = cargo build --release --lib
+
+if WITH_TESTS
+command += --tests
+endif
+
+if WITH_EXAMPLES
+command += --examples
+endif
+
+all:
+ $(command)
+
+clean:
+ cargo clean
+
EXTRA_DIST = Cargo.toml
SUBDIRS = examples src tests