Commit 6944a06d authored by Masahiro Yamada's avatar Masahiro Yamada

samples: guard sub-directories with CONFIG options

Do not descend to sub-directories when unneeded.

I used subdir-$(CONFIG_...) for hidraw, seccomp, and vfs because
they only contain host programs.

While we are here, let's add SPDX License tag, and sort the directories
alphabetically.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent a3bc8864
# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux samples code # Makefile for Linux samples code
obj-y += kobject/ kprobes/ trace_events/ livepatch/ \ obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
configfs/ connector/ v4l/ trace_printk/ \ obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
vfio-mdev/ vfs/ qmi/ binderfs/ pidfd/ subdir-y += hidraw
obj-$(CONFIG_SAMPLE_HW_BREAKPOINT) += hw_breakpoint/
obj-$(CONFIG_SAMPLE_KDB) += kdb/
obj-$(CONFIG_SAMPLE_KFIFO) += kfifo/
obj-$(CONFIG_SAMPLE_KOBJECT) += kobject/
obj-$(CONFIG_SAMPLE_KPROBES) += kprobes/
obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch/
subdir-y += pidfd
obj-$(CONFIG_SAMPLE_QMI_CLIENT) += qmi/
obj-$(CONFIG_SAMPLE_RPMSG_CLIENT) += rpmsg/
subdir-$(CONFIG_SAMPLE_SECCOMP) += seccomp
obj-$(CONFIG_SAMPLE_TRACE_EVENTS) += trace_events/
obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/
obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/
obj-y += vfio-mdev/
subdir-$(CONFIG_SAMPLE_VFS) += vfs
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
ifndef CROSS_COMPILE ifndef CROSS_COMPILE
hostprogs-$(CONFIG_SAMPLE_SECCOMP) := bpf-fancy dropper bpf-direct user-trap hostprogs-y := bpf-fancy dropper bpf-direct user-trap
HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include
......
# List of programs to build # List of programs to build
hostprogs-$(CONFIG_SAMPLE_VFS) := \ hostprogs-y := \
test-fsmount \ test-fsmount \
test-statx test-statx
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment