kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / m32r / Makefile
CommitLineData
1da177e4
LT
1#
2# m32r/Makefile
3#
4f193362
PS
4# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies.
6#
1da177e4 7
7622b464
AB
8KBUILD_DEFCONFIG := m32700ut.smp_defconfig
9
1da177e4
LT
10LDFLAGS :=
11OBJCOPYFLAGS := -O binary -R .note -R .comment -S
3d60f849 12LDFLAGS_vmlinux :=
1da177e4 13
a0f97e06 14KBUILD_CFLAGS += -pipe -fno-schedule-insns
1da177e4 15CFLAGS_KERNEL += -mmodel=medium
6588169d 16KBUILD_CFLAGS_MODULE += -mmodel=large
1da177e4
LT
17
18ifdef CONFIG_CHIP_VDEC2
19cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst
cde05cf2 20aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
1da177e4
LT
21else
22cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2
cde05cf2 23aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2
1da177e4
LT
24endif
25
26cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
cde05cf2 27aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
1da177e4 28
a0f97e06 29KBUILD_CFLAGS += $(cflags-y)
222d394d 30KBUILD_AFLAGS += $(aflags-y)
1da177e4 31
c74dbac7 32CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
1da177e4
LT
33
34head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
35
a0f97e06 36LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
1da177e4
LT
37
38libs-y += arch/m32r/lib/ $(LIBGCC)
39core-y += arch/m32r/kernel/ \
40 arch/m32r/mm/ \
3264f976
HT
41 arch/m32r/boot/ \
42 arch/m32r/platforms/
1da177e4
LT
43
44drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
45
46boot := arch/m32r/boot
47
4f193362 48PHONY += zImage
1da177e4
LT
49
50all: zImage
51
52zImage: vmlinux
53 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
54
55compressed: zImage
56
57archclean:
58 $(Q)$(MAKE) $(clean)=$(boot)
59
60define archhelp
61 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
62endef