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
24 platform-
$(CONFIG_XTENSA_PLATFORM_XT2000
) := xt2000
25 platform-
$(CONFIG_XTENSA_PLATFORM_ISS
) := iss
27 PLATFORM
= $(platform-y
)
30 CPPFLAGS
+= $(if
$(KBUILD_SRC
),-I
$(srctree
)/include/asm-xtensa
/)
31 CPPFLAGS
+= -Iinclude
/asm
32 CFLAGS
+= -pipe
-mlongcalls
34 KBUILD_DEFCONFIG
:= iss_defconfig
36 # ramdisk/initrd support
37 # You need a compressed ramdisk image, named ramdisk.gz in
38 # arch/xtensa/boot/ramdisk
40 core-
$(CONFIG_EMBEDDED_RAMDISK
) += arch
/xtensa
/boot
/ramdisk
/
42 # Test for cross compiling
45 COMPILE_ARCH
= $(shell uname
-m
)
47 ifneq ($(COMPILE_ARCH
), xtensa
)
49 CROSS_COMPILE
= xtensa_
$(CPU
)-
56 LIBGCC
:= $(shell $(CC
) $(CFLAGS
) -print-libgcc-file-name
)
58 head-y
:= arch
/xtensa
/kernel
/head.o
59 core-y
+= arch
/xtensa
/kernel
/ arch
/xtensa
/mm
/
61 core-y
+= arch
/xtensa
/platform-
$(PLATFORM
)/
63 libs-y
+= arch
/xtensa
/lib
/ $(LIBGCC
)
65 boot
:= arch
/xtensa
/boot
67 archinc
:= include/asm-xtensa
69 arch
/xtensa
/kernel
/asm-offsets.s
: \
70 arch
/xtensa
/kernel
/asm-offsets.c
$(archinc
)/.platform
72 include/asm-xtensa
/offsets.h
: arch
/xtensa
/kernel
/asm-offsets.s
73 $(call filechk
,gen-asm-offsets
)
75 prepare
: $(archinc
)/.platform
$(archinc
)/offsets.h
77 # Update machine cpu and platform symlinks if something which affects
80 $(archinc
)/.platform
: $(wildcard include/config
/arch
/*.h
) include/config
/MARKER
81 @echo
' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)'
82 $(Q
)mkdir
-p
$(archinc
)
83 $(Q
)mkdir
-p
$(archinc
)/xtensa
84 $(Q
)ln
-fsn
$(srctree
)/$(archinc
)/xtensa
/config-
$(CPU
) $(archinc
)/xtensa
/config
85 @echo
' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
86 $(Q
)ln
-fsn
$(srctree
)/$(archinc
)/platform-
$(PLATFORM
) $(archinc
)/platform
94 zImage zImage.initrd
: vmlinux
95 $(Q
)$(MAKE
) $(build
)=$(boot
) $@
97 CLEAN_FILES
+= arch
/xtensa
/vmlinux.lds
$(archinc
)/offset.h \
98 $(archinc
)/platform
$(archinc
)/xtensa
/config \
102 @echo
'* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'