blob: 4072a07ebf8e301af8fa34fa788e5c5ece63eccb [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
8LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S
Hirokazu Takata3d60f842007-02-10 01:43:39 -080010LDFLAGS_vmlinux :=
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Sam Ravnborga0f97e02007-10-14 22:21:35 +020012KBUILD_CFLAGS += -pipe -fno-schedule-insns
Linus Torvalds1da177e2005-04-16 15:20:36 -070013CFLAGS_KERNEL += -mmodel=medium
14CFLAGS_MODULE += -mmodel=large
15
16ifdef CONFIG_CHIP_VDEC2
17cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst
Hirokazu Takatacde05cf2006-02-24 13:03:50 -080018aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel
Linus Torvalds1da177e2005-04-16 15:20:36 -070019else
20cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2
Hirokazu Takatacde05cf2006-02-24 13:03:50 -080021aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2
Linus Torvalds1da177e2005-04-16 15:20:36 -070022endif
23
24cflags-$(CONFIG_ISA_M32R) += -DNO_FPU
Hirokazu Takatacde05cf2006-02-24 13:03:50 -080025aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Sam Ravnborga0f97e02007-10-14 22:21:35 +020027KBUILD_CFLAGS += $(cflags-y)
Sam Ravnborg222d3942007-10-15 21:59:31 +020028KBUILD_AFLAGS += $(aflags-y)
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Al Viroc74dbac2005-09-26 06:19:28 +010030CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
32head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
33
Sam Ravnborga0f97e02007-10-14 22:21:35 +020034LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
36libs-y += arch/m32r/lib/ $(LIBGCC)
37core-y += arch/m32r/kernel/ \
38 arch/m32r/mm/ \
Hirokazu Takata3264f972007-08-01 21:09:31 +090039 arch/m32r/boot/ \
40 arch/m32r/platforms/
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
42drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
43
44boot := arch/m32r/boot
45
Paul Smith4f193362006-03-05 17:14:10 -050046PHONY += zImage
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
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