Commit | Line | Data |
---|---|---|
8e1a6dd2 CZ |
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. | |
173d6681 | 14 | # (Use VAR=<xtensa_config> to use another default compiler.) |
8e1a6dd2 | 15 | |
173d6681 CZ |
16 | variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf |
17 | variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom | |
8e1a6dd2 | 18 | |
173d6681 CZ |
19 | VARIANT = $(variant-y) |
20 | export VARIANT | |
8e1a6dd2 CZ |
21 | |
22 | # Platform configuration | |
23 | ||
8e1a6dd2 CZ |
24 | platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 |
25 | platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss | |
26 | ||
27 | PLATFORM = $(platform-y) | |
28 | export PLATFORM | |
29 | ||
e7d163f7 | 30 | CFLAGS += -pipe -mlongcalls |
8e1a6dd2 | 31 | |
e7d163f7 | 32 | KBUILD_DEFCONFIG := iss_defconfig |
8e1a6dd2 CZ |
33 | |
34 | # ramdisk/initrd support | |
35 | # You need a compressed ramdisk image, named ramdisk.gz in | |
36 | # arch/xtensa/boot/ramdisk | |
37 | ||
38 | core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ | |
39 | ||
40 | # Test for cross compiling | |
41 | ||
173d6681 | 42 | ifneq ($(VARIANT),) |
8e1a6dd2 CZ |
43 | COMPILE_ARCH = $(shell uname -m) |
44 | ||
45 | ifneq ($(COMPILE_ARCH), xtensa) | |
46 | ifndef CROSS_COMPILE | |
173d6681 | 47 | CROSS_COMPILE = xtensa_$(VARIANT)- |
8e1a6dd2 CZ |
48 | endif |
49 | endif | |
50 | endif | |
51 | ||
52 | # | |
53 | ||
54 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | |
55 | ||
56 | head-y := arch/xtensa/kernel/head.o | |
e7d163f7 CZ |
57 | core-y += arch/xtensa/kernel/ arch/xtensa/mm/ |
58 | ifneq ($(PLATFORM),) | |
59 | core-y += arch/xtensa/platform-$(PLATFORM)/ | |
60 | endif | |
8e1a6dd2 CZ |
61 | libs-y += arch/xtensa/lib/ $(LIBGCC) |
62 | ||
e7d163f7 CZ |
63 | boot := arch/xtensa/boot |
64 | ||
65 | archinc := include/asm-xtensa | |
8e1a6dd2 | 66 | |
5bb78269 | 67 | archprepare: $(archinc)/.platform |
8e1a6dd2 | 68 | |
173d6681 | 69 | # Update processor variant and platform symlinks if something which affects |
8e1a6dd2 CZ |
70 | # them changed. |
71 | ||
2e3646e5 | 72 | $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf |
173d6681 | 73 | @echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)' |
e7d163f7 | 74 | $(Q)mkdir -p $(archinc) |
173d6681 | 75 | $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant |
e7d163f7 CZ |
76 | @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' |
77 | $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform | |
78 | @touch $@ | |
79 | ||
8e1a6dd2 CZ |
80 | |
81 | all: zImage | |
82 | ||
83 | bzImage : zImage | |
84 | ||
85 | zImage zImage.initrd: vmlinux | |
86 | $(Q)$(MAKE) $(build)=$(boot) $@ | |
87 | ||
0013a854 | 88 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ |
173d6681 | 89 | $(archinc)/platform $(archinc)/variant \ |
e7d163f7 | 90 | $(archinc)/.platform |
8e1a6dd2 CZ |
91 | |
92 | define archhelp | |
93 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' | |
94 | endef | |
95 |