From e7a82fc0330f1189797d16b03fc6391475d79c6d Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Wed, 18 Dec 2019 20:29:33 -0800 Subject: [PATCH] sync: add zlib dependency and libbpf_common.h to list of installed headers zlib is now a direct dependency of libbpf (previously zlib was only dependency of libelf, on which libbpf depends as well). For non-pkg-config case, specify `-lz` compiler flag explicitly. Recent sync also added another public header to libbpf. Include it in a list of headers that are installed on target system. Signed-off-by: Andrii Nakryiko --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index e539c02..bc25aba 100644 --- a/src/Makefile +++ b/src/Makefile @@ -21,7 +21,7 @@ CFLAGS ?= -g -O2 -Werror -Wall ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ALL_LDFLAGS += $(LDFLAGS) ifdef NO_PKG_CONFIG - ALL_LDFLAGS += -lelf + ALL_LDFLAGS += -lelf -lz else PKG_CONFIG ?= pkg-config ALL_CFLAGS += $(shell $(PKG_CONFIG) --cflags libelf) @@ -47,7 +47,7 @@ endif HEADERS := bpf.h libbpf.h btf.h xsk.h libbpf_util.h \ bpf_helpers.h bpf_helper_defs.h bpf_tracing.h \ - bpf_endian.h bpf_core_read.h + bpf_endian.h bpf_core_read.h libbpf_common.h UAPI_HEADERS := $(addprefix $(TOPDIR)/include/uapi/linux/,\ bpf.h bpf_common.h btf.h)