Merge tag 'trace-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[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/
26LIBGCC_PATH := \
27 $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
28libs-y += $(LIBGCC_PATH)
29
30ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
31BUILTIN_DTB := y
32else
33BUILTIN_DTB := n
34endif
35
36ifdef CONFIG_CPU_LITTLE_ENDIAN
d78a62fb 37KBUILD_CFLAGS += $(call cc-option, -EL)
e71ea3ba 38else
d78a62fb 39KBUILD_CFLAGS += $(call cc-option, -EB)
e71ea3ba
GH
40endif
41
42boot := arch/nds32/boot
43core-$(BUILTIN_DTB) += $(boot)/dts/
44
45.PHONY: FORCE
46
47Image: vmlinux
48 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
49
50
51PHONY += vdso_install
52vdso_install:
53 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso $@
54
55prepare: vdso_prepare
56vdso_prepare: prepare0
57 $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
58
59CLEAN_FILES += include/asm-nds32/constants.h*
60
61# We use MRPROPER_FILES and CLEAN_FILES now
62archclean:
63 $(Q)$(MAKE) $(clean)=$(boot)
64
65define archhelp
66 echo ' Image - kernel image (arch/$(ARCH)/boot/Image)'
67endef