Makefile (0c8ea05e9b3d8e5287e2a968f2a2e744dfd31b99) | Makefile (e342d6f6f7d82b48c4540b947d8032a3b7b3e6f8) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2 3HID_SAMPLES_PATH ?= $(abspath $(src)) 4TOOLS_PATH := $(HID_SAMPLES_PATH)/../../tools 5 6pound := \# 7 8# List of programs to build 9tprogs-y += hid_mouse 10tprogs-y += hid_surface_dial 11 12# Libbpf dependencies 13LIBBPF_SRC = $(TOOLS_PATH)/lib/bpf 14LIBBPF_OUTPUT = $(abspath $(HID_SAMPLES_PATH))/libbpf 15LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) 16LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include 17LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a 18 | 1# SPDX-License-Identifier: GPL-2.0 2 3HID_SAMPLES_PATH ?= $(abspath $(src)) 4TOOLS_PATH := $(HID_SAMPLES_PATH)/../../tools 5 6pound := \# 7 8# List of programs to build 9tprogs-y += hid_mouse 10tprogs-y += hid_surface_dial 11 12# Libbpf dependencies 13LIBBPF_SRC = $(TOOLS_PATH)/lib/bpf 14LIBBPF_OUTPUT = $(abspath $(HID_SAMPLES_PATH))/libbpf 15LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) 16LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include 17LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a 18 |
19EXTRA_HEADERS := hid_bpf_attach.h | |
20EXTRA_BPF_HEADERS := hid_bpf_helpers.h 21 22hid_mouse-objs := hid_mouse.o 23hid_surface_dial-objs := hid_surface_dial.o 24 25# Tell kbuild to always build the programs 26always-y := $(tprogs-y) 27 --- 174 unchanged lines hidden (view full) --- 202 -Wno-compare-distinct-pointer-types -I$(srctree)/include \ 203 -I$(srctree)/samples/bpf -I$(srctree)/tools/include \ 204 -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \ 205 -c $(filter %.bpf.c,$^) -o $@ 206 207LINKED_SKELS := hid_mouse.skel.h hid_surface_dial.skel.h 208clean-files += $(LINKED_SKELS) 209 | 19EXTRA_BPF_HEADERS := hid_bpf_helpers.h 20 21hid_mouse-objs := hid_mouse.o 22hid_surface_dial-objs := hid_surface_dial.o 23 24# Tell kbuild to always build the programs 25always-y := $(tprogs-y) 26 --- 174 unchanged lines hidden (view full) --- 201 -Wno-compare-distinct-pointer-types -I$(srctree)/include \ 202 -I$(srctree)/samples/bpf -I$(srctree)/tools/include \ 203 -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \ 204 -c $(filter %.bpf.c,$^) -o $@ 205 206LINKED_SKELS := hid_mouse.skel.h hid_surface_dial.skel.h 207clean-files += $(LINKED_SKELS) 208 |
210hid_mouse.skel.h-deps := hid_mouse.bpf.o hid_bpf_attach.bpf.o 211hid_surface_dial.skel.h-deps := hid_surface_dial.bpf.o hid_bpf_attach.bpf.o | 209hid_mouse.skel.h-deps := hid_mouse.bpf.o 210hid_surface_dial.skel.h-deps := hid_surface_dial.bpf.o |
212 213LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.bpf.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps))) 214 215BPF_SRCS_LINKED := $(notdir $(wildcard $(src)/*.bpf.c)) 216BPF_OBJS_LINKED := $(patsubst %.bpf.c,$(obj)/%.bpf.o, $(BPF_SRCS_LINKED)) 217BPF_SKELS_LINKED := $(addprefix $(obj)/,$(LINKED_SKELS)) 218 219$(BPF_SKELS_LINKED): $(BPF_OBJS_LINKED) $(BPFTOOL) --- 31 unchanged lines hidden --- | 211 212LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.bpf.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps))) 213 214BPF_SRCS_LINKED := $(notdir $(wildcard $(src)/*.bpf.c)) 215BPF_OBJS_LINKED := $(patsubst %.bpf.c,$(obj)/%.bpf.o, $(BPF_SRCS_LINKED)) 216BPF_SKELS_LINKED := $(addprefix $(obj)/,$(LINKED_SKELS)) 217 218$(BPF_SKELS_LINKED): $(BPF_OBJS_LINKED) $(BPFTOOL) --- 31 unchanged lines hidden --- |