Makefile: link against zlib

Without this we would be missing symbols, as shown e.g. by
ldd -r libbpf.so
This commit is contained in:
Vladimír Čunát
2020-09-08 10:47:10 +02:00
committed by Andrii Nakryiko
parent 011700e68d
commit 8b14cb43ff

View File

@@ -24,8 +24,8 @@ ifdef NO_PKG_CONFIG
ALL_LDFLAGS += -lelf -lz ALL_LDFLAGS += -lelf -lz
else else
PKG_CONFIG ?= pkg-config PKG_CONFIG ?= pkg-config
ALL_CFLAGS += $(shell $(PKG_CONFIG) --cflags libelf) ALL_CFLAGS += $(shell $(PKG_CONFIG) --cflags libelf zlib)
ALL_LDFLAGS += $(shell $(PKG_CONFIG) --libs libelf) ALL_LDFLAGS += $(shell $(PKG_CONFIG) --libs libelf zlib)
endif endif
OBJDIR ?= . OBJDIR ?= .