1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 LIBBPF_INCLUDE = $(srctree)/tools/lib !! 3 LIBBPF_SRCS = $(srctree)/tools/lib/bpf/ >> 4 LIBBPF_A = $(obj)/libbpf.a >> 5 LIBBPF_OUT = $(abspath $(obj)) >> 6 >> 7 # Although not in use by libbpf's Makefile, set $(O) so that the "dummy" test >> 8 # in tools/scripts/Makefile.include always succeeds when building the kernel >> 9 # with $(O) pointing to a relative path, as in "make O=build bindeb-pkg". >> 10 $(LIBBPF_A): >> 11 $(Q)$(MAKE) -C $(LIBBPF_SRCS) O=$(LIBBPF_OUT)/ OUTPUT=$(LIBBPF_OUT)/ $(LIBBPF_OUT)/libbpf.a >> 12 >> 13 userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi \ >> 14 -I $(srctree)/tools/lib/ -Wno-unused-result >> 15 >> 16 userprogs := bpf_preload_umd >> 17 >> 18 clean-files := $(userprogs) bpf_helper_defs.h FEATURE-DUMP.libbpf staticobjs/ feature/ >> 19 >> 20 bpf_preload_umd-objs := iterators/iterators.o >> 21 bpf_preload_umd-userldlibs := $(LIBBPF_A) -lelf -lz >> 22 >> 23 $(obj)/bpf_preload_umd: $(LIBBPF_A) >> 24 >> 25 $(obj)/bpf_preload_umd_blob.o: $(obj)/bpf_preload_umd 4 26 5 obj-$(CONFIG_BPF_PRELOAD_UMD) += bpf_preload.o 27 obj-$(CONFIG_BPF_PRELOAD_UMD) += bpf_preload.o 6 CFLAGS_bpf_preload_kern.o += -I$(LIBBPF_INCLUD !! 28 bpf_preload-objs += bpf_preload_kern.o bpf_preload_umd_blob.o 7 bpf_preload-objs += bpf_preload_kern.o <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.