aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 31 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 622c918abff..b62c1e09444 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 4 2PATCHLEVEL = 4
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc3 4EXTRAVERSION =
5NAME = Saber-toothed Squirrel 5NAME = Saber-toothed Squirrel
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
@@ -400,8 +400,10 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve
400 400
401# Files to ignore in find ... statements 401# Files to ignore in find ... statements
402 402
403RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o 403RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
404export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git 404 -o -name .pc -o -name .hg -o -name .git \) -prune -o
405export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
406 --exclude CVS --exclude .pc --exclude .hg --exclude .git
405 407
406# =========================================================================== 408# ===========================================================================
407# Rules shared between *config targets and build targets 409# Rules shared between *config targets and build targets
@@ -442,7 +444,7 @@ asm-generic:
442 444
443no-dot-config-targets := clean mrproper distclean \ 445no-dot-config-targets := clean mrproper distclean \
444 cscope gtags TAGS tags help %docs check% coccicheck \ 446 cscope gtags TAGS tags help %docs check% coccicheck \
445 include/linux/version.h headers_% archheaders \ 447 include/linux/version.h headers_% archheaders archscripts \
446 kernelversion %src-pkg 448 kernelversion %src-pkg
447 449
448config-targets := 0 450config-targets := 0
@@ -564,6 +566,16 @@ else
564KBUILD_CFLAGS += -O2 566KBUILD_CFLAGS += -O2
565endif 567endif
566 568
569ifdef CONFIG_READABLE_ASM
570# Disable optimizations that make assembler listings hard to read.
571# reorder blocks reorders the control in the function
572# ipa clone creates specialized cloned functions
573# partial inlining inlines only parts of functions
574KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
575 $(call cc-option,-fno-ipa-cp-clone,) \
576 $(call cc-option,-fno-partial-inlining)
577endif
578
567include $(srctree)/arch/$(SRCARCH)/Makefile 579include $(srctree)/arch/$(SRCARCH)/Makefile
568 580
569ifneq ($(CONFIG_FRAME_WARN),0) 581ifneq ($(CONFIG_FRAME_WARN),0)
@@ -976,7 +988,7 @@ prepare3: include/config/kernel.release
976ifneq ($(KBUILD_SRC),) 988ifneq ($(KBUILD_SRC),)
977 @$(kecho) ' Using $(srctree) as source for kernel' 989 @$(kecho) ' Using $(srctree) as source for kernel'
978 $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ 990 $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
979 echo " $(srctree) is not clean, please run 'make mrproper'";\ 991 echo " $(srctree) is not clean, please run 'make mrproper'"; \
980 echo " in the '$(srctree)' directory.";\ 992 echo " in the '$(srctree)' directory.";\
981 /bin/false; \ 993 /bin/false; \
982 fi; 994 fi;
@@ -989,7 +1001,7 @@ prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
989 include/config/auto.conf 1001 include/config/auto.conf
990 $(cmd_crmodverdir) 1002 $(cmd_crmodverdir)
991 1003
992archprepare: archheaders prepare1 scripts_basic 1004archprepare: archheaders archscripts prepare1 scripts_basic
993 1005
994prepare0: archprepare FORCE 1006prepare0: archprepare FORCE
995 $(Q)$(MAKE) $(build)=. 1007 $(Q)$(MAKE) $(build)=.
@@ -1013,8 +1025,8 @@ define filechk_utsrelease.h
1013endef 1025endef
1014 1026
1015define filechk_version.h 1027define filechk_version.h
1016 (echo \#define LINUX_VERSION_CODE $(shell \ 1028 (echo \#define LINUX_VERSION_CODE $(shell \
1017 expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \ 1029 expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
1018 echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) 1030 echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
1019endef 1031endef
1020 1032
@@ -1059,8 +1071,11 @@ hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
1059PHONY += archheaders 1071PHONY += archheaders
1060archheaders: 1072archheaders:
1061 1073
1074PHONY += archscripts
1075archscripts:
1076
1062PHONY += __headers 1077PHONY += __headers
1063__headers: include/linux/version.h scripts_basic asm-generic archheaders FORCE 1078__headers: include/linux/version.h scripts_basic asm-generic archheaders archscripts FORCE
1064 $(Q)$(MAKE) $(build)=scripts build_unifdef 1079 $(Q)$(MAKE) $(build)=scripts build_unifdef
1065 1080
1066PHONY += headers_install_all 1081PHONY += headers_install_all
@@ -1478,6 +1493,13 @@ kernelrelease:
1478kernelversion: 1493kernelversion:
1479 @echo $(KERNELVERSION) 1494 @echo $(KERNELVERSION)
1480 1495
1496# Clear a bunch of variables before executing the submake
1497tools/: FORCE
1498 $(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/
1499
1500tools/%: FORCE
1501 $(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/ $*
1502
1481# Single targets 1503# Single targets
1482# --------------------------------------------------------------------------- 1504# ---------------------------------------------------------------------------
1483# Single targets are compatible with: 1505# Single targets are compatible with: