Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / arch / xtensa / Makefile
bloba9fcef8eabe01605394e4c54c390c973f280783b
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.
6 # Copyright (C) 2001 - 2005 Tensilica Inc.
8 # This file is included by the global makefile so that you can add your own
9 # architecture-specific flags and dependencies. Remember to do have actions
10 # for "archclean" and "archdep" for cleaning up and making dependencies for
11 # this architecture
13 # Core configuration.
14 # (Use VAR=<xtensa_config> to use another default compiler.)
16 variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf
17 variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
19 VARIANT = $(variant-y)
20 export VARIANT
22 # Platform configuration
24 platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
25 platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
27 PLATFORM = $(platform-y)
28 export PLATFORM
30 # temporarily until string.h is fixed
31 KBUILD_CFLAGS += -ffreestanding
33 KBUILD_CFLAGS += -pipe -mlongcalls
35 KBUILD_DEFCONFIG := iss_defconfig
37 # ramdisk/initrd support
38 # You need a compressed ramdisk image, named ramdisk.gz in
39 # arch/xtensa/boot/ramdisk
41 core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
43 # Test for cross compiling
45 ifneq ($(VARIANT),)
46 COMPILE_ARCH = $(shell uname -m)
48 ifneq ($(COMPILE_ARCH), xtensa)
49 ifndef CROSS_COMPILE
50 CROSS_COMPILE = xtensa_$(VARIANT)-
51 endif
52 endif
53 endif
57 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
59 head-y := arch/xtensa/kernel/head.o
60 core-y += arch/xtensa/kernel/ arch/xtensa/mm/
61 ifneq ($(PLATFORM),)
62 <<<<<<< HEAD:arch/xtensa/Makefile
63 core-y += arch/xtensa/platform-$(PLATFORM)/
64 =======
65 core-y += arch/xtensa/platforms/$(PLATFORM)/
66 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/xtensa/Makefile
67 endif
68 libs-y += arch/xtensa/lib/ $(LIBGCC)
70 boot := arch/xtensa/boot
72 archinc := include/asm-xtensa
74 archprepare: $(archinc)/.platform
76 # Update processor variant and platform symlinks if something which affects
77 # them changed.
79 $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
80 @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
81 $(Q)mkdir -p $(archinc)
82 $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
83 @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
84 $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
85 @touch $@
88 all: zImage
90 bzImage : zImage
92 zImage zImage.initrd: vmlinux
93 $(Q)$(MAKE) $(build)=$(boot) $@
95 CLEAN_FILES += arch/xtensa/vmlinux.lds \
96 $(archinc)/platform $(archinc)/variant \
97 $(archinc)/.platform
99 define archhelp
100 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
101 endef