xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order...
[linux-2.6-microblaze.git] / arch / nds32 / Makefile
1 LDFLAGS_vmlinux := --no-undefined -X
2 OBJCOPYFLAGS    := -O binary -R .note -R .note.gnu.build-id -R .comment -S
3
4 KBUILD_DEFCONFIG := defconfig
5
6 comma = ,
7
8
9 ifdef CONFIG_FUNCTION_TRACER
10 arch-y += -malways-save-lp -mno-relax
11 endif
12
13 # Avoid generating FPU instructions
14 arch-y  += -mno-ext-fpu-sp -mno-ext-fpu-dp -mfloat-abi=soft
15
16 KBUILD_CFLAGS   += $(call cc-option, -mno-sched-prolog-epilog)
17 KBUILD_CFLAGS   += -mcmodel=large
18
19 KBUILD_CFLAGS   +=$(arch-y) $(tune-y)
20 KBUILD_AFLAGS   +=$(arch-y) $(tune-y)
21
22 #Default value
23 head-y           := arch/nds32/kernel/head.o
24 textaddr-y       := $(CONFIG_PAGE_OFFSET)+0xc000
25
26 TEXTADDR := $(textaddr-y)
27
28 export  TEXTADDR
29
30
31 # If we have a machine-specific directory, then include it in the build.
32 core-y                          += arch/nds32/kernel/ arch/nds32/mm/
33 core-$(CONFIG_FPU)              += arch/nds32/math-emu/
34 libs-y                          += arch/nds32/lib/
35
36 ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
37 BUILTIN_DTB := y
38 else
39 BUILTIN_DTB := n
40 endif
41
42 ifdef CONFIG_CPU_LITTLE_ENDIAN
43 KBUILD_CFLAGS   += $(call cc-option, -EL)
44 KBUILD_AFLAGS   += $(call cc-option, -EL)
45 KBUILD_LDFLAGS  += $(call cc-option, -EL)
46 CHECKFLAGS      += -D__NDS32_EL__
47 else
48 KBUILD_CFLAGS   += $(call cc-option, -EB)
49 KBUILD_AFLAGS   += $(call cc-option, -EB)
50 KBUILD_LDFLAGS  += $(call cc-option, -EB)
51 CHECKFLAGS      += -D__NDS32_EB__
52 endif
53
54 boot := arch/nds32/boot
55 core-y += $(boot)/dts/
56
57 .PHONY: FORCE
58
59 Image: vmlinux
60         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
61
62
63 PHONY += vdso_install
64 vdso_install:
65         $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@
66
67 prepare: vdso_prepare
68 vdso_prepare: prepare0
69         $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
70
71 CLEAN_FILES += include/asm-nds32/constants.h*
72
73 # We use MRPROPER_FILES and CLEAN_FILES now
74 archclean:
75         $(Q)$(MAKE) $(clean)=$(boot)
76
77 define archhelp
78   echo  '  Image         - kernel image (arch/$(ARCH)/boot/Image)'
79 endef