Merge git://git.infradead.org/users/dwmw2/libraid-2.6 into for-linus
[pandora-kernel.git] / arch / tile / Makefile
1 #
2 # This file is subject to the terms and conditions of the GNU General Public
3 # License.  See the file "COPYING" in the main directory of this archive
4 # for more details.
5 #
6 # This file is included by the global makefile so that you can add your own
7 # architecture-specific flags and dependencies. Remember to do have actions
8 # for "archclean" and "archdep" for cleaning up and making dependencies for
9 # this architecture
10
11 ifeq ($(CROSS_COMPILE),)
12 # If building with TILERA_ROOT set (i.e. using the Tilera Multicore
13 # Development Environment) we can set CROSS_COMPILE based on that.
14 ifdef TILERA_ROOT
15 CROSS_COMPILE   = $(TILERA_ROOT)/bin/tile-
16 endif
17 endif
18
19 # If we're not cross-compiling, make sure we're on the right architecture.
20 ifeq ($(CROSS_COMPILE),)
21 HOST_ARCH = $(shell uname -m)
22 ifneq ($(HOST_ARCH),$(ARCH))
23 $(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH))
24 endif
25 endif
26
27
28 KBUILD_CFLAGS   += $(CONFIG_DEBUG_EXTRA_FLAGS)
29
30 LIBGCC_PATH     := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
31
32 # Provide the path to use for "make defconfig".
33 KBUILD_DEFCONFIG := $(ARCH)_defconfig
34
35 # Used as a file extension when useful, e.g. head_$(BITS).o
36 # Not needed for (e.g.) "$(CC) -m32" since the compiler automatically
37 # uses the right default anyway.
38 export BITS
39 ifeq ($(CONFIG_TILEGX),y)
40 BITS := 64
41 else
42 BITS := 32
43 endif
44
45 head-y          := arch/tile/kernel/head_$(BITS).o
46
47 libs-y          += arch/tile/lib/
48 libs-y          += $(LIBGCC_PATH)
49
50
51 # See arch/tile/Kbuild for content of core part of the kernel
52 core-y          += arch/tile/