blob: 95f836db38fa3129cd10f2574c2c8cdf1000df79 [file] [log] [blame]
Chris Zankel8e1a6dd2005-06-23 22:01:10 -07001#
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# Copyright (C) 2001 - 2005 Tensilica Inc.
7#
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
12
13# Core configuration.
Chris Zankel173d6682006-12-10 02:18:48 -080014# (Use VAR=<xtensa_config> to use another default compiler.)
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070015
Chris Zankel173d6682006-12-10 02:18:48 -080016variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf
17variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070018
Chris Zankel173d6682006-12-10 02:18:48 -080019VARIANT = $(variant-y)
20export VARIANT
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070021
22# Platform configuration
23
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070024platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
25platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
26
27PLATFORM = $(platform-y)
28export PLATFORM
29
Chris Zankele7d163f2005-06-30 02:58:59 -070030CFLAGS += -pipe -mlongcalls
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070031
Chris Zankele7d163f2005-06-30 02:58:59 -070032KBUILD_DEFCONFIG := iss_defconfig
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070033
34# ramdisk/initrd support
35# You need a compressed ramdisk image, named ramdisk.gz in
36# arch/xtensa/boot/ramdisk
37
38core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
39
40# Test for cross compiling
41
Chris Zankel173d6682006-12-10 02:18:48 -080042ifneq ($(VARIANT),)
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070043 COMPILE_ARCH = $(shell uname -m)
44
45 ifneq ($(COMPILE_ARCH), xtensa)
46 ifndef CROSS_COMPILE
Chris Zankel173d6682006-12-10 02:18:48 -080047 CROSS_COMPILE = xtensa_$(VARIANT)-
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070048 endif
49 endif
50endif
51
52#
53
54LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
55
56head-y := arch/xtensa/kernel/head.o
Chris Zankele7d163f2005-06-30 02:58:59 -070057core-y += arch/xtensa/kernel/ arch/xtensa/mm/
58ifneq ($(PLATFORM),)
59core-y += arch/xtensa/platform-$(PLATFORM)/
60endif
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070061libs-y += arch/xtensa/lib/ $(LIBGCC)
62
Chris Zankele7d163f2005-06-30 02:58:59 -070063boot := arch/xtensa/boot
64
65archinc := include/asm-xtensa
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070066
Sam Ravnborg5bb78262005-09-11 22:30:22 +020067archprepare: $(archinc)/.platform
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070068
Chris Zankel173d6682006-12-10 02:18:48 -080069# Update processor variant and platform symlinks if something which affects
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070070# them changed.
71
Roman Zippel2e3646e2006-06-08 22:12:42 -070072$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
Chris Zankel173d6682006-12-10 02:18:48 -080073 @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
Chris Zankele7d163f2005-06-30 02:58:59 -070074 $(Q)mkdir -p $(archinc)
Chris Zankel173d6682006-12-10 02:18:48 -080075 $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
Chris Zankele7d163f2005-06-30 02:58:59 -070076 @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
77 $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
78 @touch $@
79
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070080
81all: zImage
82
83bzImage : zImage
84
85zImage zImage.initrd: vmlinux
86 $(Q)$(MAKE) $(build)=$(boot) $@
87
Sam Ravnborg0013a852005-09-09 20:57:26 +020088CLEAN_FILES += arch/xtensa/vmlinux.lds \
Chris Zankel173d6682006-12-10 02:18:48 -080089 $(archinc)/platform $(archinc)/variant \
Chris Zankele7d163f2005-06-30 02:58:59 -070090 $(archinc)/.platform
Chris Zankel8e1a6dd2005-06-23 22:01:10 -070091
92define archhelp
93 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
94endef
95