From 8d02203bb618117ddd693561a510ae5504f9556f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 29 Aug 2021 13:58:10 +0900 Subject: [PATCH] Add LIBBPF_CFLAGS for eBPF program and nghttpx --- bpf/Makefile.am | 3 ++- src/Makefile.am | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bpf/Makefile.am b/bpf/Makefile.am index 6bdd586d..60fe7a13 100644 --- a/bpf/Makefile.am +++ b/bpf/Makefile.am @@ -31,6 +31,7 @@ bpf_pkglib_DATA = reuseport_kern.o all: $(builddir)/reuseport_kern.o $(builddir)/reuseport_kern.o: reuseport_kern.c - $(CC) @BPFCFLAGS@ @EXTRABPFCFLAGS@ -target bpf -g -c $< -o $@ + $(CC) @LIBBPF_CFLAGS@ @BPFCFLAGS@ @EXTRABPFCFLAGS@ \ + -target bpf -g -c $< -o $@ endif # HAVE_LIBBPF diff --git a/src/Makefile.am b/src/Makefile.am index 15b1d402..a0545b4f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,6 +51,7 @@ AM_CPPFLAGS = \ @OPENSSL_CFLAGS@ \ @LIBCARES_CFLAGS@ \ @JANSSON_CFLAGS@ \ + @LIBBPF_CFLAGS@ \ @ZLIB_CFLAGS@ \ @EXTRA_DEFS@ \ @DEFS@ @@ -69,6 +70,7 @@ LDADD = $(top_builddir)/lib/libnghttp2.la \ @LIBCARES_LIBS@ \ @SYSTEMD_LIBS@ \ @JANSSON_LIBS@ \ + @LIBBPF_LIBS@ \ @ZLIB_LIBS@ \ @APPLDFLAGS@ @@ -187,7 +189,7 @@ libnghttpx_a_CPPFLAGS = ${AM_CPPFLAGS} nghttpx_SOURCES = shrpx.cc shrpx.h nghttpx_CPPFLAGS = ${libnghttpx_a_CPPFLAGS} -nghttpx_LDADD = libnghttpx.a ${LDADD} @LIBBPF_LIBS@ +nghttpx_LDADD = libnghttpx.a ${LDADD} if HAVE_MRUBY libnghttpx_a_CPPFLAGS += \ @@ -219,8 +221,7 @@ nghttpx_unittest_SOURCES = shrpx-unittest.cc \ base64_test.cc base64_test.h nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS} \ -DNGHTTP2_SRC_DIR=\"$(top_srcdir)/src\" -nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} @CUNIT_LIBS@ @TESTLDADD@ \ - @LIBBPF_LIBS@ +nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} @CUNIT_LIBS@ @TESTLDADD@ if HAVE_MRUBY nghttpx_unittest_CPPFLAGS += \