aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/Makefile
diff options
context:
space:
mode:
authorChris Zankel <czankel@tensilica.com>2005-06-24 01:01:10 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:05:21 -0400
commit8e1a6dd2fddcc73c9e933758361e3d9c076c688a (patch)
tree30d6c0cdc7f21d1357917517351a1c259f3eba4b /arch/xtensa/Makefile
parent48b415ca13bac91f83db3b9d362fd5ae0ce275cb (diff)
[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 1
The attached patches provides part 1 of an architecture implementation for the Tensilica Xtensa CPU series. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/xtensa/Makefile')
-rw-r--r--arch/xtensa/Makefile102
1 files changed, 102 insertions, 0 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
new file mode 100644
index 00000000000..4fa27453b1f
--- /dev/null
+++ b/arch/xtensa/Makefile
@@ -0,0 +1,102 @@
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# 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.
14# (Use CPU=<xtensa_config> to use another default compiler.)
15
16cpu-$(CONFIG_XTENSA_CPU_LINUX_BE) := linux_be
17cpu-$(CONFIG_XTENSA_CPU_LINUX_CUSTOM) := linux_custom
18
19CPU = $(cpu-y)
20export CPU
21
22# Platform configuration
23
24platform-y := common
25platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
26platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
27
28PLATFORM = $(platform-y)
29export PLATFORM
30
31#LDFLAGS_vmlinux := -T$(word 1,$(LINKSCRIPT))
32AFLAGS_vmlinux.lds.o := -Uxtensa
33CPPFLAGS += -Iarch/xtensa -Iinclude/asm -mlongcalls -g
34AFLAGS += -Iarch/xtensa -Iinclude/asm
35CPP = $(CC) -E $(CFLAGS)
36
37cflags-y += -Iarch/xtensa -pipe -mlongcalls
38
39
40KBUILD_DEFCONFIG := common_defconfig
41
42# ramdisk/initrd support
43# You need a compressed ramdisk image, named ramdisk.gz in
44# arch/xtensa/boot/ramdisk
45
46core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
47
48# Test for cross compiling
49
50ifneq ($(CPU),)
51 COMPILE_ARCH = $(shell uname -m)
52
53 ifneq ($(COMPILE_ARCH), xtensa)
54 ifndef CROSS_COMPILE
55 CROSS_COMPILE = xtensa_$(CPU)-
56 endif
57 endif
58endif
59
60#
61
62LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
63
64head-y := arch/xtensa/kernel/head.o
65core-y += arch/xtensa/kernel/ \
66 arch/xtensa/mm/ arch/xtensa/platform-$(PLATFORM)/
67libs-y += arch/xtensa/lib/ $(LIBGCC)
68
69boot := arch/xtensa/boot
70
71arch/xtensa/kernel/asm-offsets.s: \
72 arch/xtensa/kernel/asm-offsets.c \
73 include/asm-xtensa/.platform
74
75include/asm-xtensa/offsets.h: arch/xtensa/kernel/asm-offsets.s
76 $(call filechk,gen-asm-offsets)
77
78prepare: include/asm-xtensa/.platform include/asm-xtensa/offsets.h
79
80# Update machine cpu and platform symlinks if something which affects
81# them changed.
82
83include/asm-xtensa/.platform: $(wildcard include/config/arch/*.h)
84 @echo ' Setting up cpu ($(CPU)) and platform ($(PLATFORM)) symlinks'
85 $(Q)rm -f include/asm-xtensa/platform
86 $(Q)rm -f include/asm-xtensa/xtensa/config
87 $(Q)(cd include/asm-xtensa/; ln -sf platform-$(PLATFORM) platform)
88 $(Q)(cd include/asm-xtensa/xtensa; ln -sf config-$(CPU) config)
89
90all: zImage
91
92bzImage : zImage
93
94zImage zImage.initrd: vmlinux
95 $(Q)$(MAKE) $(build)=$(boot) $@
96
97CLEAN_FILES += arch/xtensa/vmlinux.lds include/asm-xtensa/offset.h
98
99define archhelp
100 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
101endef
102