summaryrefslogtreecommitdiff
path: root/samples/hid/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'samples/hid/Makefile')
-rw-r--r--samples/hid/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/samples/hid/Makefile b/samples/hid/Makefile
index 8fe6ccfc5f29..026288280a03 100644
--- a/samples/hid/Makefile
+++ b/samples/hid/Makefile
@@ -7,6 +7,7 @@ pound := \#
# List of programs to build
tprogs-y += hid_mouse
+tprogs-y += hid_surface_dial
# Libbpf dependencies
LIBBPF_SRC = $(TOOLS_PATH)/lib/bpf
@@ -19,6 +20,7 @@ EXTRA_HEADERS := hid_bpf_attach.h
EXTRA_BPF_HEADERS := hid_bpf_helpers.h
hid_mouse-objs := hid_mouse.o
+hid_surface_dial-objs := hid_surface_dial.o
# Tell kbuild to always build the programs
always-y := $(tprogs-y)
@@ -156,6 +158,7 @@ libbpf_hdrs: $(LIBBPF)
.PHONY: libbpf_hdrs
$(obj)/hid_mouse.o: $(obj)/hid_mouse.skel.h
+$(obj)/hid_surface_dial.o: $(obj)/hid_surface_dial.skel.h
-include $(HID_SAMPLES_PATH)/Makefile.target
@@ -201,10 +204,11 @@ $(obj)/%.bpf.o: $(src)/%.bpf.c $(EXTRA_BPF_HEADERS_SRC) $(obj)/vmlinux.h
-I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \
-c $(filter %.bpf.c,$^) -o $@
-LINKED_SKELS := hid_mouse.skel.h
+LINKED_SKELS := hid_mouse.skel.h hid_surface_dial.skel.h
clean-files += $(LINKED_SKELS)
hid_mouse.skel.h-deps := hid_mouse.bpf.o hid_bpf_attach.bpf.o
+hid_surface_dial.skel.h-deps := hid_surface_dial.bpf.o hid_bpf_attach.bpf.o
LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.bpf.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps)))