diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 31 insertions, 7 deletions
@@ -507,6 +507,10 @@ else | |||
507 | KBUILD_CFLAGS += -O2 | 507 | KBUILD_CFLAGS += -O2 |
508 | endif | 508 | endif |
509 | 509 | ||
510 | ifneq (CONFIG_FRAME_WARN,0) | ||
511 | KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) | ||
512 | endif | ||
513 | |||
510 | # Force gcc to behave correct even for buggy distributions | 514 | # Force gcc to behave correct even for buggy distributions |
511 | # Arch Makefiles may override this setting | 515 | # Arch Makefiles may override this setting |
512 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) | 516 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) |
@@ -1170,8 +1174,10 @@ rpm: include/config/kernel.release FORCE | |||
1170 | # Brief documentation of the typical targets used | 1174 | # Brief documentation of the typical targets used |
1171 | # --------------------------------------------------------------------------- | 1175 | # --------------------------------------------------------------------------- |
1172 | 1176 | ||
1173 | boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig) | 1177 | boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig) |
1174 | boards := $(notdir $(boards)) | 1178 | boards := $(notdir $(boards)) |
1179 | board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig)) | ||
1180 | board-dirs := $(sort $(notdir $(board-dirs:/=))) | ||
1175 | 1181 | ||
1176 | help: | 1182 | help: |
1177 | @echo 'Cleaning targets:' | 1183 | @echo 'Cleaning targets:' |
@@ -1217,14 +1223,19 @@ help: | |||
1217 | @echo 'Documentation targets:' | 1223 | @echo 'Documentation targets:' |
1218 | @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp | 1224 | @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp |
1219 | @echo '' | 1225 | @echo '' |
1220 | @echo 'Architecture specific targets ($(ARCH)):' | 1226 | @echo 'Architecture specific targets ($(SRCARCH)):' |
1221 | @$(if $(archhelp),$(archhelp),\ | 1227 | @$(if $(archhelp),$(archhelp),\ |
1222 | echo ' No architecture specific help defined for $(ARCH)') | 1228 | echo ' No architecture specific help defined for $(SRCARCH)') |
1223 | @echo '' | 1229 | @echo '' |
1224 | @$(if $(boards), \ | 1230 | @$(if $(boards), \ |
1225 | $(foreach b, $(boards), \ | 1231 | $(foreach b, $(boards), \ |
1226 | printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ | 1232 | printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ |
1227 | echo '') | 1233 | echo '') |
1234 | @$(if $(board-dirs), \ | ||
1235 | $(foreach b, $(board-dirs), \ | ||
1236 | printf " %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \ | ||
1237 | printf " %-16s - Show all of the above\\n" help-boards; \ | ||
1238 | echo '') | ||
1228 | 1239 | ||
1229 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' | 1240 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' |
1230 | @echo ' make V=2 [targets] 2 => give reason for rebuild of target' | 1241 | @echo ' make V=2 [targets] 2 => give reason for rebuild of target' |
@@ -1236,6 +1247,20 @@ help: | |||
1236 | @echo 'For further info see the ./README file' | 1247 | @echo 'For further info see the ./README file' |
1237 | 1248 | ||
1238 | 1249 | ||
1250 | help-board-dirs := $(addprefix help-,$(board-dirs)) | ||
1251 | |||
1252 | help-boards: $(help-board-dirs) | ||
1253 | |||
1254 | boards-per-dir = $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)) | ||
1255 | |||
1256 | $(help-board-dirs): help-%: | ||
1257 | @echo 'Architecture specific targets ($(SRCARCH) $*):' | ||
1258 | @$(if $(boards-per-dir), \ | ||
1259 | $(foreach b, $(boards-per-dir), \ | ||
1260 | printf " %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \ | ||
1261 | echo '') | ||
1262 | |||
1263 | |||
1239 | # Documentation targets | 1264 | # Documentation targets |
1240 | # --------------------------------------------------------------------------- | 1265 | # --------------------------------------------------------------------------- |
1241 | %docs: scripts_basic FORCE | 1266 | %docs: scripts_basic FORCE |
@@ -1396,7 +1421,7 @@ define xtags | |||
1396 | $(all-kconfigs) | xargs $1 -a \ | 1421 | $(all-kconfigs) | xargs $1 -a \ |
1397 | --langdef=kconfig \ | 1422 | --langdef=kconfig \ |
1398 | --language-force=kconfig \ | 1423 | --language-force=kconfig \ |
1399 | --regex-kconfig='/^[[:blank:]]*config[[:blank:]]+([[:alnum:]_]+)/\1/'; \ | 1424 | --regex-kconfig='/^[[:blank:]]*(menu|)config[[:blank:]]+([[:alnum:]_]+)/\2/'; \ |
1400 | $(all-defconfigs) | xargs -r $1 -a \ | 1425 | $(all-defconfigs) | xargs -r $1 -a \ |
1401 | --langdef=dotconfig \ | 1426 | --langdef=dotconfig \ |
1402 | --language-force=dotconfig \ | 1427 | --language-force=dotconfig \ |
@@ -1404,7 +1429,7 @@ define xtags | |||
1404 | elif $1 --version 2>&1 | grep -iq emacs; then \ | 1429 | elif $1 --version 2>&1 | grep -iq emacs; then \ |
1405 | $(all-sources) | xargs $1 -a; \ | 1430 | $(all-sources) | xargs $1 -a; \ |
1406 | $(all-kconfigs) | xargs $1 -a \ | 1431 | $(all-kconfigs) | xargs $1 -a \ |
1407 | --regex='/^[ \t]*config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \ | 1432 | --regex='/^[ \t]*(menu|)config[ \t]+\([a-zA-Z0-9_]+\)/\2/'; \ |
1408 | $(all-defconfigs) | xargs -r $1 -a \ | 1433 | $(all-defconfigs) | xargs -r $1 -a \ |
1409 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ | 1434 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ |
1410 | else \ | 1435 | else \ |
@@ -1538,8 +1563,7 @@ quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) | |||
1538 | quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) | 1563 | quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) |
1539 | cmd_rmfiles = rm -f $(rm-files) | 1564 | cmd_rmfiles = rm -f $(rm-files) |
1540 | 1565 | ||
1541 | # Run depmod only is we have System.map and depmod is executable | 1566 | # Run depmod only if we have System.map and depmod is executable |
1542 | # and we build for the host arch | ||
1543 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | 1567 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) |
1544 | cmd_depmod = \ | 1568 | cmd_depmod = \ |
1545 | if [ -r System.map -a -x $(DEPMOD) ]; then \ | 1569 | if [ -r System.map -a -x $(DEPMOD) ]; then \ |