summaryrefslogtreecommitdiff
path: root/samples/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-09 10:00:19 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-18 11:29:01 +0900
commit6944a06d141b9afea38b15da08bd773d90abef0c (patch)
tree725f77576509ada9edbca36d976a3034e67fe6a6 /samples/Makefile
parenta3bc88645e9293f5aaac9c05a185d9f1c0594c6c (diff)
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'samples/Makefile')
-rw-r--r--samples/Makefile24
1 files changed, 20 insertions, 4 deletions
diff --git a/samples/Makefile b/samples/Makefile
index 8e096e0d45d1..debf8925f06f 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -1,6 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux samples code
-obj-y += kobject/ kprobes/ trace_events/ livepatch/ \
- hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
- configfs/ connector/ v4l/ trace_printk/ \
- vfio-mdev/ vfs/ qmi/ binderfs/ pidfd/
+obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
+obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
+obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
+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