Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-block.git] / arch / nds32 / Makefile
CommitLineData
e71ea3ba
GH
1LDFLAGS_vmlinux := --no-undefined -X
2OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
3
4KBUILD_DEFCONFIG := defconfig
5
6comma = ,
7
d78a62fb
GH
8KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
9KBUILD_CFLAGS += -mcmodel=large
e71ea3ba
GH
10
11KBUILD_CFLAGS +=$(arch-y) $(tune-y)
12KBUILD_AFLAGS +=$(arch-y) $(tune-y)
13
14#Default value
15head-y := arch/nds32/kernel/head.o
16textaddr-y := $(CONFIG_PAGE_OFFSET)+0xc000
17
18TEXTADDR := $(textaddr-y)
19
20export TEXTADDR
21
22
23# If we have a machine-specific directory, then include it in the build.
24core-y += arch/nds32/kernel/ arch/nds32/mm/
25libs-y += arch/nds32/lib/
e71ea3ba
GH
26
27ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
28BUILTIN_DTB := y
29else
30BUILTIN_DTB := n
31endif
32
33ifdef CONFIG_CPU_LITTLE_ENDIAN
d78a62fb 34KBUILD_CFLAGS += $(call cc-option, -EL)
b3b112bb
GH
35KBUILD_AFLAGS += $(call cc-option, -EL)
36LDFLAGS += $(call cc-option, -EL)
e71ea3ba 37else
d78a62fb 38KBUILD_CFLAGS += $(call cc-option, -EB)
b3b112bb
GH
39KBUILD_AFLAGS += $(call cc-option, -EB)
40LDFLAGS += $(call cc-option, -EB)
e71ea3ba
GH
41endif
42
43boot := arch/nds32/boot
44core-$(BUILTIN_DTB) += $(boot)/dts/
45
46.PHONY: FORCE
47
48Image: vmlinux
49 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
50
51
52PHONY += vdso_install
53vdso_install:
54 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@
55
56prepare: vdso_prepare
57vdso_prepare: prepare0
58 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
59
60CLEAN_FILES += include/asm-nds32/constants.h*
61
62# We use MRPROPER_FILES and CLEAN_FILES now
63archclean:
64 $(Q)$(MAKE) $(clean)=$(boot)
65
66define archhelp
67 echo ' Image - kernel image (arch/$(ARCH)/boot/Image)'
68endef