aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--samples/Makefile2
2 files changed, 9 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 04bee1c5b400..87ce8bef6e5c 100644
--- a/Makefile
+++ b/Makefile
@@ -598,20 +598,21 @@ endif
598 598
599export KBUILD_MODULES KBUILD_BUILTIN 599export KBUILD_MODULES KBUILD_BUILTIN
600 600
601ifeq ($(dot-config),1)
602include include/config/auto.conf
603endif
604
601ifeq ($(KBUILD_EXTMOD),) 605ifeq ($(KBUILD_EXTMOD),)
602# Objects we will link into vmlinux / subdirs we need to visit 606# Objects we will link into vmlinux / subdirs we need to visit
603init-y := init/ 607init-y := init/
604drivers-y := drivers/ sound/ 608drivers-y := drivers/ sound/
609drivers-$(CONFIG_SAMPLES) += samples/
605net-y := net/ 610net-y := net/
606libs-y := lib/ 611libs-y := lib/
607core-y := usr/ 612core-y := usr/
608virt-y := virt/ 613virt-y := virt/
609endif # KBUILD_EXTMOD 614endif # KBUILD_EXTMOD
610 615
611ifeq ($(dot-config),1)
612include include/config/auto.conf
613endif
614
615# The all: target is the default when no target is given on the 616# The all: target is the default when no target is given on the
616# command line. 617# command line.
617# This allow a user to issue only 'make' to build a kernel including modules 618# This allow a user to issue only 'make' to build a kernel including modules
@@ -1006,7 +1007,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1)
1006export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds 1007export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
1007export LDFLAGS_vmlinux 1008export LDFLAGS_vmlinux
1008# used by scripts/package/Makefile 1009# used by scripts/package/Makefile
1009export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) 1010export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include scripts tools)
1010 1011
1011vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) 1012vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
1012 1013
@@ -1043,11 +1044,8 @@ vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE
1043 1044
1044targets := vmlinux 1045targets := vmlinux
1045 1046
1046# Build samples along the rest of the kernel. This needs headers_install. 1047# Some samples need headers_install.
1047ifdef CONFIG_SAMPLES
1048vmlinux-dirs += samples
1049samples: headers_install 1048samples: headers_install
1050endif
1051 1049
1052# The actual objects are generated when descending, 1050# The actual objects are generated when descending,
1053# make sure no implicit rule kicks in 1051# make sure no implicit rule kicks in
@@ -1363,7 +1361,7 @@ MRPROPER_FILES += .config .config.old .version \
1363# 1361#
1364clean: rm-dirs := $(CLEAN_DIRS) 1362clean: rm-dirs := $(CLEAN_DIRS)
1365clean: rm-files := $(CLEAN_FILES) 1363clean: rm-files := $(CLEAN_FILES)
1366clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples) 1364clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)
1367 1365
1368PHONY += $(clean-dirs) clean archclean vmlinuxclean 1366PHONY += $(clean-dirs) clean archclean vmlinuxclean
1369$(clean-dirs): 1367$(clean-dirs):
diff --git a/samples/Makefile b/samples/Makefile
index b1142a958811..50f858612148 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -1,6 +1,6 @@
1# Makefile for Linux samples code 1# Makefile for Linux samples code
2 2
3obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ 3obj-y += kobject/ kprobes/ trace_events/ livepatch/ \
4 hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ 4 hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
5 configfs/ connector/ v4l/ trace_printk/ \ 5 configfs/ connector/ v4l/ trace_printk/ \
6 vfio-mdev/ statx/ qmi/ binderfs/ 6 vfio-mdev/ statx/ qmi/ binderfs/