2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

Set Makefile config variables for libbpf

Source files modified:

* Makefile.config - Checks whether libbpf is installed on the system.
If so, we add -lbpf to LIBS_FEATURES, -DCONFIG_HAS_LIBBPF to
FEATURE_DEFINES and set CONFIG_HAS_LIBBPF. This allows us to check for
the presence of libbpf before compiling or executing BPF c/r code and
ZDTM tests.

* Makefile - Set CONFIG_HAS_LIBBPF to clean all files.

Signed-off-by: Abhishek Vijeev <abhishek.vijeev@gmail.com>
This commit is contained in:
Abhishek Vijeev 2020-08-15 13:37:56 +05:30 committed by Andrei Vagin
parent 95b7d06cbc
commit aa59dfc6df
2 changed files with 7 additions and 0 deletions

View File

@ -208,6 +208,7 @@ else
# To clean all files, enable make/build options here
export CONFIG_COMPAT := y
export CONFIG_GNUTLS := y
export CONFIG_HAS_LIBBPF := y
endif
#

View File

@ -15,6 +15,12 @@ ifeq ($(call pkg-config-check,libselinux),y)
FEATURE_DEFINES += -DCONFIG_HAS_SELINUX
endif
ifeq ($(call pkg-config-check,libbpf),y)
LIBS_FEATURES += -lbpf
FEATURE_DEFINES += -DCONFIG_HAS_LIBBPF
export CONFIG_HAS_LIBBPF := y
endif
ifeq ($(NO_GNUTLS)x$(call pkg-config-check,gnutls),xy)
LIBS_FEATURES += -lgnutls
export CONFIG_GNUTLS := y