From: Roland McGrath The samples/ subdirectory contains only modules. But the only make run done there is in commands for vmlinux. I can't see why this was ever done in this nonstandard fashion. As things stand, the modules don't get built by 'make modules'. I didn't make the addition of the directory use core-$(CONFIG_SAMPLES) because there is no other conditional like that in the top-level Makefile and samples/Makefile already uses obj-$(CONFIG_SAMPLES) as if it expects always to be included. Signed-off-by: Roland McGrath Cc: Sam Ravnborg Signed-off-by: Andrew Morton --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff -puN Makefile~samples-build-fix Makefile --- a/Makefile~samples-build-fix +++ a/Makefile @@ -602,7 +602,7 @@ export mod_strip_cmd ifeq ($(KBUILD_EXTMOD),) -core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ +core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ samples/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ @@ -802,9 +802,6 @@ vmlinux: $(vmlinux-lds) $(vmlinux-init) ifdef CONFIG_HEADERS_CHECK $(Q)$(MAKE) -f $(srctree)/Makefile headers_check endif -ifdef CONFIG_SAMPLES - $(Q)$(MAKE) $(build)=samples -endif $(call vmlinux-modpost) $(call if_changed_rule,vmlinux__) $(Q)rm -f .old_version _