1# SPDX-License-Identifier: GPL-2.0 2 3LIBBPF_SRCS = $(srctree)/tools/lib/bpf/ 4LIBBPF_A = $(obj)/libbpf.a 5LIBBPF_OUT = $(abspath $(obj)) 6 7$(LIBBPF_A): 8 $(Q)$(MAKE) -C $(LIBBPF_SRCS) OUTPUT=$(LIBBPF_OUT)/ $(LIBBPF_OUT)/libbpf.a 9 10userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi \ 11 -I $(srctree)/tools/lib/ -Wno-unused-result 12 13userprogs := bpf_preload_umd 14 15clean-files := $(userprogs) bpf_helper_defs.h FEATURE-DUMP.libbpf staticobjs/ feature/ 16 17bpf_preload_umd-objs := iterators/iterators.o 18bpf_preload_umd-userldlibs := $(LIBBPF_A) -lelf -lz 19 20$(obj)/bpf_preload_umd: $(LIBBPF_A) 21 22$(obj)/bpf_preload_umd_blob.o: $(obj)/bpf_preload_umd 23 24obj-$(CONFIG_BPF_PRELOAD_UMD) += bpf_preload.o 25bpf_preload-objs += bpf_preload_kern.o bpf_preload_umd_blob.o 26