diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -882,9 +882,6 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; | |||
882 | PHONY += $(vmlinux-dirs) | 882 | PHONY += $(vmlinux-dirs) |
883 | $(vmlinux-dirs): prepare scripts | 883 | $(vmlinux-dirs): prepare scripts |
884 | $(Q)$(MAKE) $(build)=$@ | 884 | $(Q)$(MAKE) $(build)=$@ |
885 | ifdef CONFIG_MODULES | ||
886 | $(Q)$(MAKE) $(modbuiltin)=$@ | ||
887 | endif | ||
888 | 885 | ||
889 | # Build the kernel release string | 886 | # Build the kernel release string |
890 | # | 887 | # |
@@ -1089,7 +1086,7 @@ ifdef CONFIG_MODULES | |||
1089 | 1086 | ||
1090 | # By default, build modules as well | 1087 | # By default, build modules as well |
1091 | 1088 | ||
1092 | all: modules | 1089 | all: modules modules.builtin |
1093 | 1090 | ||
1094 | # Build modules | 1091 | # Build modules |
1095 | # | 1092 | # |
@@ -1100,11 +1097,16 @@ all: modules | |||
1100 | PHONY += modules | 1097 | PHONY += modules |
1101 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) | 1098 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) |
1102 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order | 1099 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order |
1103 | $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.builtin) > $(objtree)/modules.builtin | ||
1104 | @$(kecho) ' Building modules, stage 2.'; | 1100 | @$(kecho) ' Building modules, stage 2.'; |
1105 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1101 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
1106 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild | 1102 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild |
1107 | 1103 | ||
1104 | modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) | ||
1105 | $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin | ||
1106 | |||
1107 | %/modules.builtin: include/config/auto.conf | modules | ||
1108 | $(Q)$(MAKE) $(modbuiltin)=$* | ||
1109 | |||
1108 | 1110 | ||
1109 | # Target to prepare building external modules | 1111 | # Target to prepare building external modules |
1110 | PHONY += modules_prepare | 1112 | PHONY += modules_prepare |