diff options
| -rw-r--r-- | Makefile | 18 | ||||
| -rw-r--r-- | samples/Makefile | 2 |
2 files changed, 9 insertions, 11 deletions
| @@ -598,20 +598,21 @@ endif | |||
| 598 | 598 | ||
| 599 | export KBUILD_MODULES KBUILD_BUILTIN | 599 | export KBUILD_MODULES KBUILD_BUILTIN |
| 600 | 600 | ||
| 601 | ifeq ($(dot-config),1) | ||
| 602 | include include/config/auto.conf | ||
| 603 | endif | ||
| 604 | |||
| 601 | ifeq ($(KBUILD_EXTMOD),) | 605 | ifeq ($(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 |
| 603 | init-y := init/ | 607 | init-y := init/ |
| 604 | drivers-y := drivers/ sound/ | 608 | drivers-y := drivers/ sound/ |
| 609 | drivers-$(CONFIG_SAMPLES) += samples/ | ||
| 605 | net-y := net/ | 610 | net-y := net/ |
| 606 | libs-y := lib/ | 611 | libs-y := lib/ |
| 607 | core-y := usr/ | 612 | core-y := usr/ |
| 608 | virt-y := virt/ | 613 | virt-y := virt/ |
| 609 | endif # KBUILD_EXTMOD | 614 | endif # KBUILD_EXTMOD |
| 610 | 615 | ||
| 611 | ifeq ($(dot-config),1) | ||
| 612 | include include/config/auto.conf | ||
| 613 | endif | ||
| 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) | |||
| 1006 | export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds | 1007 | export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds |
| 1007 | export LDFLAGS_vmlinux | 1008 | export LDFLAGS_vmlinux |
| 1008 | # used by scripts/package/Makefile | 1009 | # used by scripts/package/Makefile |
| 1009 | export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) | 1010 | export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include scripts tools) |
| 1010 | 1011 | ||
| 1011 | vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) | 1012 | vmlinux-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 | ||
| 1044 | targets := vmlinux | 1045 | targets := vmlinux |
| 1045 | 1046 | ||
| 1046 | # Build samples along the rest of the kernel. This needs headers_install. | 1047 | # Some samples need headers_install. |
| 1047 | ifdef CONFIG_SAMPLES | ||
| 1048 | vmlinux-dirs += samples | ||
| 1049 | samples: headers_install | 1048 | samples: headers_install |
| 1050 | endif | ||
| 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 | # |
| 1364 | clean: rm-dirs := $(CLEAN_DIRS) | 1362 | clean: rm-dirs := $(CLEAN_DIRS) |
| 1365 | clean: rm-files := $(CLEAN_FILES) | 1363 | clean: rm-files := $(CLEAN_FILES) |
| 1366 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples) | 1364 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) |
| 1367 | 1365 | ||
| 1368 | PHONY += $(clean-dirs) clean archclean vmlinuxclean | 1366 | PHONY += $(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 | ||
| 3 | obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ | 3 | obj-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/ |
