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 CPU=<xtensa_config> to use another default compiler.)
16 cpu-
$(CONFIG_XTENSA_CPU_LINUX_BE
) := linux_be
17 cpu-
$(CONFIG_XTENSA_CPU_LINUX_CUSTOM
) := linux_custom
22 # Platform configuration
25 platform-
$(CONFIG_XTENSA_PLATFORM_XT2000
) := xt2000
26 platform-
$(CONFIG_XTENSA_PLATFORM_ISS
) := iss
28 PLATFORM
= $(platform-y
)
31 #LDFLAGS_vmlinux := -T$(word 1,$(LINKSCRIPT))
32 AFLAGS_vmlinux.lds.o
:= -Uxtensa
33 CPPFLAGS
+= -Iarch
/xtensa
-Iinclude
/asm
-mlongcalls
-g
34 AFLAGS
+= -Iarch
/xtensa
-Iinclude
/asm
35 CPP
= $(CC
) -E
$(CFLAGS
)
37 cflags-y
+= -Iarch
/xtensa
-pipe
-mlongcalls
40 KBUILD_DEFCONFIG
:= common_defconfig
42 # ramdisk/initrd support
43 # You need a compressed ramdisk image, named ramdisk.gz in
44 # arch/xtensa/boot/ramdisk
46 core-
$(CONFIG_EMBEDDED_RAMDISK
) += arch
/xtensa
/boot
/ramdisk
/
48 # Test for cross compiling
51 COMPILE_ARCH
= $(shell uname
-m
)
53 ifneq ($(COMPILE_ARCH
), xtensa
)
55 CROSS_COMPILE
= xtensa_
$(CPU
)-
62 LIBGCC
:= $(shell $(CC
) $(CFLAGS
) -print-libgcc-file-name
)
64 head-y
:= arch
/xtensa
/kernel
/head.o
65 core-y
+= arch
/xtensa
/kernel
/ \
66 arch
/xtensa
/mm
/ arch
/xtensa
/platform-
$(PLATFORM
)/
67 libs-y
+= arch
/xtensa
/lib
/ $(LIBGCC
)
69 boot
:= arch
/xtensa
/boot
71 arch
/xtensa
/kernel
/asm-offsets.s
: \
72 arch
/xtensa
/kernel
/asm-offsets.c \
73 include/asm-xtensa
/.platform
75 include/asm-xtensa
/offsets.h
: arch
/xtensa
/kernel
/asm-offsets.s
76 $(call filechk
,gen-asm-offsets
)
78 prepare
: include/asm-xtensa
/.platform
include/asm-xtensa
/offsets.h
80 # Update machine cpu and platform symlinks if something which affects
83 include/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
)
94 zImage zImage.initrd
: vmlinux
95 $(Q
)$(MAKE
) $(build
)=$(boot
) $@
97 CLEAN_FILES
+= arch
/xtensa
/vmlinux.lds
include/asm-xtensa
/offset.h
100 @echo
'* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'