]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/m32r/Makefile
kbuild: enable 'make CFLAGS=...' to add additional options to CC
[mirror_ubuntu-artful-kernel.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
LT
7
8LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S
3d60f849 10LDFLAGS_vmlinux :=
1da177e4 11
a0f97e06 12KBUILD_CFLAGS += -pipe -fno-schedule-insns
1da177e4
LT
13CFLAGS_KERNEL += -mmodel=medium
14CFLAGS_MODULE += -mmodel=large
15
16ifdef CONFIG_CHIP_VDEC2
17cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst
cde05cf2 18aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
1da177e4
LT
19else
20cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2
cde05cf2 21aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2
1da177e4
LT
22endif
23
24cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
cde05cf2 25aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
1da177e4 26
a0f97e06 27KBUILD_CFLAGS += $(cflags-y)
1da177e4
LT
28AFLAGS += $(aflags-y)
29
c74dbac7 30CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
1da177e4
LT
31
32head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
33
a0f97e06 34LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
1da177e4
LT
35
36libs-y += arch/m32r/lib/ $(LIBGCC)
37core-y += arch/m32r/kernel/ \
38 arch/m32r/mm/ \
3264f976
HT
39 arch/m32r/boot/ \
40 arch/m32r/platforms/
1da177e4
LT
41
42drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
43
44boot := arch/m32r/boot
45
4f193362 46PHONY += zImage
1da177e4
LT
47
48all: zImage
49
50zImage: vmlinux
51 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
52
53compressed: zImage
54
55archclean:
56 $(Q)$(MAKE) $(clean)=$(boot)
57
58define archhelp
59 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
60endef