RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / mn10300 / Makefile
blobac5c6bdb2f05c6535ab802cf34000f206995badb
1 ###############################################################################
3 # MN10300 Kernel makefile system specifications
5 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
6 # Modified by David Howells (dhowells@redhat.com)
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public Licence
10 # as published by the Free Software Foundation; either version
11 # 2 of the Licence, or (at your option) any later version.
13 ###############################################################################
15 KBUILD_DEFCONFIG := asb2303_defconfig
17 CCSPECS := $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-)
18 CCDIR := $(strip $(patsubst %/specs,%,$(CCSPECS)))
19 KBUILD_CPPFLAGS += -nostdinc -I$(CCDIR)/include
21 LDFLAGS :=
22 OBJCOPYFLAGS := -O binary -R .note -R .comment -R .GCC-command-line -R .note.gnu.build-id -S
23 #LDFLAGS_vmlinux := -Map linkmap.txt
24 CHECKFLAGS +=
26 PROCESSOR := unset
27 UNIT := unset
29 KBUILD_CFLAGS += -mam33 -mmem-funcs -DCPU=AM33
30 KBUILD_AFLAGS += -mam33 -DCPU=AM33
32 ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y)
33 KBUILD_CFLAGS += -ffixed-e2 -fcall-saved-e5
34 endif
36 ifeq ($(CONFIG_MN10300_PROC_MN103E010),y)
37 PROCESSOR := mn103e010
38 endif
40 ifeq ($(CONFIG_MN10300_UNIT_ASB2303),y)
41 UNIT := asb2303
42 endif
43 ifeq ($(CONFIG_MN10300_UNIT_ASB2305),y)
44 UNIT := asb2305
45 endif
48 head-y := arch/mn10300/kernel/head.o arch/mn10300/kernel/init_task.o
50 core-y += arch/mn10300/kernel/ arch/mn10300/mm/
52 ifneq ($(PROCESSOR),unset)
53 core-y += arch/mn10300/proc-$(PROCESSOR)/
54 endif
55 ifneq ($(UNIT),unset)
56 core-y += arch/mn10300/unit-$(UNIT)/
57 endif
58 libs-y += arch/mn10300/lib/
60 drivers-$(CONFIG_OPROFILE) += arch/mn10300/oprofile/
62 boot := arch/mn10300/boot
64 .PHONY: zImage
66 KBUILD_IMAGE := $(boot)/zImage
67 CLEAN_FILES += $(boot)/zImage
68 CLEAN_FILES += $(boot)/compressed/vmlinux
69 CLEAN_FILES += $(boot)/compressed/vmlinux.bin
70 CLEAN_FILES += $(boot)/compressed/vmlinux.bin.gz
72 zImage: vmlinux
73 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
75 all: zImage
77 bootstrap:
78 $(Q)$(MAKEBOOT) bootstrap
80 archclean:
81 $(Q)$(MAKE) $(clean)=arch/mn10300/proc-mn103e010
82 $(Q)$(MAKE) $(clean)=arch/mn10300/unit-asb2303
83 $(Q)$(MAKE) $(clean)=arch/mn10300/unit-asb2305
85 define archhelp
86 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
87 endef
89 # If you make sure the .S files get compiled with debug info,
90 # uncomment the following to disable optimisations
91 # that are unhelpful whilst debugging.
92 ifdef CONFIG_DEBUG_INFO
93 #KBUILD_CFLAGS += -O1
94 KBUILD_AFLAGS += -Wa,--gdwarf2
95 endif
98 # include the appropriate processor- and unit-specific headers
100 KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/proc-$(PROCESSOR)/include
101 KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/unit-$(UNIT)/include