kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree
[pandora-kernel.git] / Makefile
index 3dbaac6..b401942 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
-SUBLEVEL = 16
-EXTRAVERSION =-rc4
+SUBLEVEL = 17
+EXTRAVERSION =-rc1
 NAME=Sliding Snow Leopard
 
 # *DOCUMENTATION*
@@ -306,8 +306,7 @@ LINUXINCLUDE    := -Iinclude \
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
 CFLAGS                 := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-                  -fno-strict-aliasing -fno-common \
-                  -ffreestanding
+                  -fno-strict-aliasing -fno-common
 AFLAGS         := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from .kernelrelease (if it exists)
@@ -478,6 +477,10 @@ else
 CFLAGS         += -fomit-frame-pointer
 endif
 
+ifdef CONFIG_UNWIND_INFO
+CFLAGS         += -fasynchronous-unwind-tables
+endif
+
 ifdef CONFIG_DEBUG_INFO
 CFLAGS         += -g
 endif
@@ -994,9 +997,9 @@ distclean: mrproper
 package-dir    := $(srctree)/scripts/package
 
 %pkg: FORCE
-       $(Q)$(MAKE) -f $(package-dir)/Makefile $@
+       $(Q)$(MAKE) $(build)=$(package-dir) $@
 rpm: FORCE
-       $(Q)$(MAKE) -f $(package-dir)/Makefile $@
+       $(Q)$(MAKE) $(build)=$(package-dir) $@
 
 
 # Brief documentation of the typical targets used
@@ -1028,13 +1031,11 @@ help:
        @echo  '  kernelversion   - Output the version stored in Makefile'
        @echo  ''
        @echo  'Static analysers'
-       @echo  '  buildcheck      - List dangling references to vmlinux discarded sections'
-       @echo  '                    and init sections from non-init sections'
        @echo  '  checkstack      - Generate a list of stack hogs'
        @echo  '  namespacecheck  - Name space analysis on compiled kernel'
        @echo  ''
        @echo  'Kernel packaging:'
-       @$(MAKE) -f $(package-dir)/Makefile help
+       @$(MAKE) $(build)=$(package-dir) help
        @echo  ''
        @echo  'Documentation targets:'
        @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
@@ -1255,10 +1256,6 @@ versioncheck:
                -name '*.[hcS]' -type f -print | sort \
                | xargs $(PERL) -w scripts/checkversion.pl
 
-buildcheck:
-       $(PERL) $(srctree)/scripts/reference_discarded.pl
-       $(PERL) $(srctree)/scripts/reference_init.pl
-
 namespacecheck:
        $(PERL) $(srctree)/scripts/namespace.pl