diff options
author | Abhishek Vijeev <abhishek.vijeev@gmail.com> | 2020-08-15 11:07:56 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-10-20 10:18:24 +0300 |
commit | aa59dfc6dfcb3a52a1f64c97f75b9827261be25b (patch) | |
tree | aff90b67edab5d4183fe6a1ad7bd083d021afaca /Makefile.config | |
parent | 95b7d06cbc4cb31509b03f988f2541942d2624f7 (diff) |
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>
Diffstat (limited to 'Makefile.config')
-rw-r--r-- | Makefile.config | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.config b/Makefile.config index 98ba5d892..3d99e680b 100644 --- a/Makefile.config +++ b/Makefile.config @@ -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 |