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
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
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)
22 # Platform configuration
24 platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
25 platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
27 PLATFORM = $(platform-y)
30 CFLAGS += -pipe -mlongcalls
32 KBUILD_DEFCONFIG := iss_defconfig
34 # ramdisk/initrd support
35 # You need a compressed ramdisk image, named ramdisk.gz in
36 # arch/xtensa/boot/ramdisk
38 core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
40 # Test for cross compiling
43 COMPILE_ARCH = $(shell uname -m)
45 ifneq ($(COMPILE_ARCH), xtensa)
47 CROSS_COMPILE = xtensa_$(VARIANT)-
54 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
56 head-y := arch/xtensa/kernel/head.o
57 core-y += arch/xtensa/kernel/ arch/xtensa/mm/
59 core-y += arch/xtensa/platform-$(PLATFORM)/
61 libs-y += arch/xtensa/lib/ $(LIBGCC)
63 boot := arch/xtensa/boot
65 archinc := include/asm-xtensa
67 archprepare: $(archinc)/.platform
69 # Update processor variant and platform symlinks if something which affects
72 $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
73 @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
74 $(Q)mkdir -p $(archinc)
75 $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
76 @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
77 $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
85 zImage zImage.initrd: vmlinux
86 $(Q)$(MAKE) $(build)=$(boot) $@
88 CLEAN_FILES += arch/xtensa/vmlinux.lds \
89 $(archinc)/platform $(archinc)/variant \
93 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'