blob: def8dd0b6bc58bb6309a4e29dabcad8814d58e53 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
2# m32r/Makefile
3#
Paul Smith4f193362006-03-05 17:14:10 -05004# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies.
6#
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Adrian Bunk7622b462008-04-22 00:33:02 +03008KBUILD_DEFCONFIG := m32700ut.smp_defconfig
9
Linus Torvalds1da177e2005-04-16 15:20:36 -070010LDFLAGS :=
11OBJCOPYFLAGS := -O binary -R .note -R .comment -S
Hirokazu Takata3d60f842007-02-10 01:43:39 -080012LDFLAGS_vmlinux :=
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
Sam Ravnborga0f97e02007-10-14 22:21:35 +020014KBUILD_CFLAGS += -pipe -fno-schedule-insns
Sam Ravnborg80c00ba2010-07-28 19:11:27 +020015KBUILD_CFLAGS_KERNEL += -mmodel=medium
Sam Ravnborg65881692010-07-28 17:33:09 +020016KBUILD_CFLAGS_MODULE += -mmodel=large
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18ifdef CONFIG_CHIP_VDEC2
19cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst
Hirokazu Takatacde05cf2006-02-24 13:03:50 -080020aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
Linus Torvalds1da177e2005-04-16 15:20:36 -070021else
22cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2
Hirokazu Takatacde05cf2006-02-24 13:03:50 -080023aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2
Linus Torvalds1da177e2005-04-16 15:20:36 -070024endif
25
26cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
Hirokazu Takatacde05cf2006-02-24 13:03:50 -080027aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Sam Ravnborga0f97e02007-10-14 22:21:35 +020029KBUILD_CFLAGS += $(cflags-y)
Sam Ravnborg222d3942007-10-15 21:59:31 +020030KBUILD_AFLAGS += $(aflags-y)
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Al Viroc74dbac2005-09-26 06:19:28 +010032CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
Thomas Gleixner7433c5c2012-05-03 09:02:54 +000034head-y := arch/m32r/kernel/head.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Sam Ravnborga0f97e02007-10-14 22:21:35 +020036LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
38libs-y += arch/m32r/lib/ $(LIBGCC)
39core-y += arch/m32r/kernel/ \
40 arch/m32r/mm/ \
Hirokazu Takata3264f972007-08-01 21:09:31 +090041 arch/m32r/boot/ \
42 arch/m32r/platforms/
Linus Torvalds1da177e2005-04-16 15:20:36 -070043
44drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
45
46boot := arch/m32r/boot
47
Paul Smith4f193362006-03-05 17:14:10 -050048PHONY += zImage
Linus Torvalds1da177e2005-04-16 15:20:36 -070049
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