block: add helpers to run flush_dcache_page() against a bio and a request's pages
[linux-2.6.git] / arch / cris / Makefile
1 #
2 # cris/Makefile
3 #
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" and "archdep" for cleaning up and making dependencies for
7 # this architecture
8 #
9 # This file is subject to the terms and conditions of the GNU General Public
10 # License.  See the file "COPYING" in the main directory of this archive
11 # for more details.
12
13 KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig
14
15 arch-y := v10
16 arch-$(CONFIG_ETRAX_ARCH_V10) := v10
17 arch-$(CONFIG_ETRAX_ARCH_V32) := v32
18
19 # No config available for make clean etc
20 mach-y := fs
21 mach-$(CONFIG_CRIS_MACH_ARTPEC3) := a3
22 mach-$(CONFIG_ETRAXFS) := fs
23
24 ifneq ($(arch-y),)
25 SARCH := arch-$(arch-y)
26 inc := -Iarch/cris/include/$(SARCH)
27 inc += -Iarch/cris/include/$(SARCH)/arch
28 else
29 SARCH :=
30 inc :=
31 endif
32
33 ifneq ($(mach-y),)
34 MACH := mach-$(mach-y)
35 inc += -Iarch/cris/include/$(SARCH)/$(MACH)/
36 inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach
37 else
38 MACH :=
39 endif
40
41 LD = $(CROSS_COMPILE)ld -mcrislinux
42
43 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
44
45 KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
46 KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
47 KBUILD_CPPFLAGS += $(inc)
48
49 ifdef CONFIG_FRAME_POINTER
50 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
51 KBUILD_CFLAGS += -fno-omit-frame-pointer
52 endif
53
54 head-y := arch/cris/$(SARCH)/kernel/head.o
55
56 LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
57
58 core-y          += arch/cris/kernel/ arch/cris/mm/
59 core-y          += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/
60 ifdef CONFIG_ETRAX_ARCH_V32
61 core-y          += arch/cris/$(SARCH)/$(MACH)/
62 endif
63 drivers-y       += arch/cris/$(SARCH)/drivers/
64 libs-y          += arch/cris/$(SARCH)/lib/ $(LIBGCC)
65
66 # cris source path
67 SRC_ARCH              = $(srctree)/arch/cris
68 # cris object files path
69 OBJ_ARCH              = $(objtree)/arch/cris
70
71 boot := arch/cris/boot
72 MACHINE := arch/cris/$(SARCH)
73
74 all: zImage
75
76 zImage Image: vmlinux
77         $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
78
79 archprepare:
80
81 archclean:
82         $(Q)if [ -e arch/cris/boot ]; then \
83                 $(MAKE) $(clean)=arch/cris/boot; \
84         fi
85
86 CLEAN_FILES += \
87         $(boot)/zImage \
88         $(boot)/compressed/decompress.bin \
89         $(boot)/compressed/piggy.gz \
90         $(boot)/rescue/rescue.bin
91
92
93 # MRPROPER_FILES +=
94
95 define archhelp
96   echo  '* zImage        - Compressed kernel image (arch/cris/boot/zImage)'
97   echo  '* Image         - Uncompressed kernel image (arch/cris/boot/Image)'
98 endef