debugobjects: Make stack check warning more informative
[linux/fpc-iii.git] / arch / nds32 / Makefile
blob031c676821ff8797a879c6af56aeffd9ea4c4ed3
1 LDFLAGS_vmlinux := --no-undefined -X
2 OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
4 KBUILD_DEFCONFIG := defconfig
6 comma = ,
8 KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
9 KBUILD_CFLAGS += -mcmodel=large
11 KBUILD_CFLAGS +=$(arch-y) $(tune-y)
12 KBUILD_AFLAGS +=$(arch-y) $(tune-y)
14 #Default value
15 head-y := arch/nds32/kernel/head.o
16 textaddr-y := $(CONFIG_PAGE_OFFSET)+0xc000
18 TEXTADDR := $(textaddr-y)
20 export TEXTADDR
23 # If we have a machine-specific directory, then include it in the build.
24 core-y += arch/nds32/kernel/ arch/nds32/mm/
25 libs-y += arch/nds32/lib/
27 ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
28 BUILTIN_DTB := y
29 else
30 BUILTIN_DTB := n
31 endif
33 ifdef CONFIG_CPU_LITTLE_ENDIAN
34 KBUILD_CFLAGS += $(call cc-option, -EL)
35 KBUILD_AFLAGS += $(call cc-option, -EL)
36 LDFLAGS += $(call cc-option, -EL)
37 CHECKFLAGS += -D__NDS32_EL__
38 else
39 KBUILD_CFLAGS += $(call cc-option, -EB)
40 KBUILD_AFLAGS += $(call cc-option, -EB)
41 LDFLAGS += $(call cc-option, -EB)
42 CHECKFLAGS += -D__NDS32_EB__
43 endif
45 boot := arch/nds32/boot
46 core-$(BUILTIN_DTB) += $(boot)/dts/
48 .PHONY: FORCE
50 Image: vmlinux
51 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
54 PHONY += vdso_install
55 vdso_install:
56 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@
58 prepare: vdso_prepare
59 vdso_prepare: prepare0
60 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
62 CLEAN_FILES += include/asm-nds32/constants.h*
64 # We use MRPROPER_FILES and CLEAN_FILES now
65 archclean:
66 $(Q)$(MAKE) $(clean)=$(boot)
68 define archhelp
69 echo ' Image - kernel image (arch/$(ARCH)/boot/Image)'
70 endef