[MIPS] WRPPMC serial support move to platform device
[linux-2.6/mini2440.git] / arch / xtensa / Makefile
blobacf05be2492911ae50b270d788f0a10c69087742
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 cflags-y += -ffreestanding
33 cflags-y += -pipe -mlongcalls
35 CFLAGS += $(cflags-y)
37 KBUILD_DEFCONFIG := iss_defconfig
39 # ramdisk/initrd support
40 # You need a compressed ramdisk image, named ramdisk.gz in
41 # arch/xtensa/boot/ramdisk
43 core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
45 # Test for cross compiling
47 ifneq ($(VARIANT),)
48 COMPILE_ARCH = $(shell uname -m)
50 ifneq ($(COMPILE_ARCH), xtensa)
51 ifndef CROSS_COMPILE
52 CROSS_COMPILE = xtensa_$(VARIANT)-
53 endif
54 endif
55 endif
59 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
61 head-y := arch/xtensa/kernel/head.o
62 core-y += arch/xtensa/kernel/ arch/xtensa/mm/
63 ifneq ($(PLATFORM),)
64 core-y += arch/xtensa/platform-$(PLATFORM)/
65 endif
66 libs-y += arch/xtensa/lib/ $(LIBGCC)
68 boot := arch/xtensa/boot
70 archinc := include/asm-xtensa
72 archprepare: $(archinc)/.platform
74 # Update processor variant and platform symlinks if something which affects
75 # them changed.
77 $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
78 @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
79 $(Q)mkdir -p $(archinc)
80 $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
81 @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
82 $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
83 @touch $@
86 all: zImage
88 bzImage : zImage
90 zImage zImage.initrd: vmlinux
91 $(Q)$(MAKE) $(build)=$(boot) $@
93 CLEAN_FILES += arch/xtensa/vmlinux.lds \
94 $(archinc)/platform $(archinc)/variant \
95 $(archinc)/.platform
97 define archhelp
98 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
99 endef