mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
e949f4c2d6
Commit 5318321d36
("samples: disable CONFIG_SAMPLES for UML") used
a big hammer to fix the build errors under the samples/ directory.
Only some samples actually include uapi headers from usr/include.
Introduce CONFIG_HEADERS_INSTALL since 'depends on HEADERS_INSTALL' is
clearer than 'depends on !UML'. If this option is enabled, uapi headers
are installed before starting directory descending.
I added 'depends on HEADERS_INSTALL' to per-sample CONFIG options.
This allows UML to compile some samples.
$ make ARCH=um allmodconfig samples/
[ snip ]
CC [M] samples/configfs/configfs_sample.o
CC [M] samples/kfifo/bytestream-example.o
CC [M] samples/kfifo/dma-example.o
CC [M] samples/kfifo/inttype-example.o
CC [M] samples/kfifo/record-example.o
CC [M] samples/kobject/kobject-example.o
CC [M] samples/kobject/kset-example.o
CC [M] samples/trace_events/trace-events-sample.o
CC [M] samples/trace_printk/trace-printk.o
AR samples/vfio-mdev/built-in.a
AR samples/built-in.a
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
23 lines
880 B
Makefile
23 lines
880 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for Linux samples code
|
|
|
|
obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
|
|
obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
|
|
obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
|
|
subdir-$(CONFIG_SAMPLE_HIDRAW) += 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-$(CONFIG_SAMPLE_PIDFD) += 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
|