diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 41 |
1 files changed, 25 insertions, 16 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 15 | 3 | SUBLEVEL = 16 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION =-rc1 |
5 | NAME=Sliding Snow Leopard | 5 | NAME=Sliding Snow Leopard |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) | |||
106 | $(if $(KBUILD_OUTPUT),, \ | 106 | $(if $(KBUILD_OUTPUT),, \ |
107 | $(error output directory "$(saved-output)" does not exist)) | 107 | $(error output directory "$(saved-output)" does not exist)) |
108 | 108 | ||
109 | .PHONY: $(MAKECMDGOALS) | 109 | .PHONY: $(MAKECMDGOALS) cdbuilddir |
110 | $(MAKECMDGOALS) _all: cdbuilddir | ||
110 | 111 | ||
111 | $(filter-out _all,$(MAKECMDGOALS)) _all: | 112 | cdbuilddir: |
112 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ | 113 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ |
113 | KBUILD_SRC=$(CURDIR) \ | 114 | KBUILD_SRC=$(CURDIR) \ |
114 | KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@ | 115 | KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS) |
115 | 116 | ||
116 | # Leave processing to above invocation of make | 117 | # Leave processing to above invocation of make |
117 | skip-makefile := 1 | 118 | skip-makefile := 1 |
@@ -151,7 +152,7 @@ export srctree objtree VPATH TOPDIR | |||
151 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | 152 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ |
152 | -e s/arm.*/arm/ -e s/sa110/arm/ \ | 153 | -e s/arm.*/arm/ -e s/sa110/arm/ \ |
153 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ | 154 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ |
154 | -e s/ppc64/powerpc/ ) | 155 | -e s/ppc.*/powerpc/ ) |
155 | 156 | ||
156 | # Cross compiling and selecting different set of gcc/bin-utils | 157 | # Cross compiling and selecting different set of gcc/bin-utils |
157 | # --------------------------------------------------------------------------- | 158 | # --------------------------------------------------------------------------- |
@@ -262,6 +263,13 @@ export quiet Q KBUILD_VERBOSE | |||
262 | # cc support functions to be used (only) in arch/$(ARCH)/Makefile | 263 | # cc support functions to be used (only) in arch/$(ARCH)/Makefile |
263 | # See documentation in Documentation/kbuild/makefiles.txt | 264 | # See documentation in Documentation/kbuild/makefiles.txt |
264 | 265 | ||
266 | # as-option | ||
267 | # Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,) | ||
268 | |||
269 | as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \ | ||
270 | -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ | ||
271 | else echo "$(2)"; fi ;) | ||
272 | |||
265 | # cc-option | 273 | # cc-option |
266 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) | 274 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) |
267 | 275 | ||
@@ -337,8 +345,9 @@ AFLAGS := -D__ASSEMBLY__ | |||
337 | 345 | ||
338 | # Read KERNELRELEASE from .kernelrelease (if it exists) | 346 | # Read KERNELRELEASE from .kernelrelease (if it exists) |
339 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) | 347 | KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) |
348 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | ||
340 | 349 | ||
341 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \ | 350 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ |
342 | ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ | 351 | ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ |
343 | CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ | 352 | CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ |
344 | HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 353 | HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
@@ -433,6 +442,7 @@ export KBUILD_DEFCONFIG | |||
433 | config %config: scripts_basic outputmakefile FORCE | 442 | config %config: scripts_basic outputmakefile FORCE |
434 | $(Q)mkdir -p include/linux | 443 | $(Q)mkdir -p include/linux |
435 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 444 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
445 | $(Q)$(MAKE) .kernelrelease | ||
436 | 446 | ||
437 | else | 447 | else |
438 | # =========================================================================== | 448 | # =========================================================================== |
@@ -542,7 +552,7 @@ export INSTALL_PATH ?= /boot | |||
542 | # makefile but the arguement can be passed to make if needed. | 552 | # makefile but the arguement can be passed to make if needed. |
543 | # | 553 | # |
544 | 554 | ||
545 | MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | 555 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
546 | export MODLIB | 556 | export MODLIB |
547 | 557 | ||
548 | 558 | ||
@@ -783,12 +793,10 @@ endif | |||
783 | localver-full = $(localver)$(localver-auto) | 793 | localver-full = $(localver)$(localver-auto) |
784 | 794 | ||
785 | # Store (new) KERNELRELASE string in .kernelrelease | 795 | # Store (new) KERNELRELASE string in .kernelrelease |
786 | kernelrelease = \ | 796 | kernelrelease = $(KERNELVERSION)$(localver-full) |
787 | $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full) | ||
788 | .kernelrelease: FORCE | 797 | .kernelrelease: FORCE |
789 | $(Q)rm -f .kernelrelease | 798 | $(Q)rm -f $@ |
790 | $(Q)echo $(kernelrelease) > .kernelrelease | 799 | $(Q)echo $(kernelrelease) > $@ |
791 | $(Q)echo " Building kernel $(kernelrelease)" | ||
792 | 800 | ||
793 | 801 | ||
794 | # Things we need to do before we recursively start building the kernel | 802 | # Things we need to do before we recursively start building the kernel |
@@ -898,7 +906,7 @@ define filechk_version.h | |||
898 | ) | 906 | ) |
899 | endef | 907 | endef |
900 | 908 | ||
901 | include/linux/version.h: $(srctree)/Makefile FORCE | 909 | include/linux/version.h: $(srctree)/Makefile .config FORCE |
902 | $(call filechk,version.h) | 910 | $(call filechk,version.h) |
903 | 911 | ||
904 | # --------------------------------------------------------------------------- | 912 | # --------------------------------------------------------------------------- |
@@ -1301,9 +1309,10 @@ checkstack: | |||
1301 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) | 1309 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) |
1302 | 1310 | ||
1303 | kernelrelease: | 1311 | kernelrelease: |
1304 | @echo $(KERNELRELEASE) | 1312 | $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \ |
1313 | $(error kernelrelease not valid - run 'make *config' to update it)) | ||
1305 | kernelversion: | 1314 | kernelversion: |
1306 | @echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 1315 | @echo $(KERNELVERSION) |
1307 | 1316 | ||
1308 | # FIXME Should go into a make.lib or something | 1317 | # FIXME Should go into a make.lib or something |
1309 | # =========================================================================== | 1318 | # =========================================================================== |