]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - samples/bpf/Makefile
samples/bpf: fix build by setting HAVE_ATTR_TEST to zero
[mirror_ubuntu-bionic-kernel.git] / samples / bpf / Makefile
index adeaa1302f346a2c2af0843584d2e1803e8f66a6..f57d8d104892f600ed94fa1677014d037653cad0 100644 (file)
@@ -143,6 +143,7 @@ HOSTCFLAGS += -I$(srctree)/tools/lib/
 HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
 HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
 HOSTCFLAGS += -I$(srctree)/tools/perf
+HOSTCFLAGS += -DHAVE_ATTR_TEST=0
 
 HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
 HOSTLOADLIBES_fds_example += -lelf
@@ -192,13 +193,16 @@ CLANG_ARCH_ARGS = -target $(ARCH)
 endif
 
 # Trick to allow make to be run from this directory
-all:
+all: $(LIBBPF)
        $(MAKE) -C ../../ $(CURDIR)/
 
 clean:
        $(MAKE) -C ../../ M=$(CURDIR) clean
        @rm -f *~
 
+$(LIBBPF): FORCE
+       $(MAKE) -C $(dir $@) $(notdir $@)
+
 $(obj)/syscall_nrs.s:  $(src)/syscall_nrs.c
        $(call if_changed_dep,cc_s_c)