Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | # |
| 3 | # m32r/Makefile |
| 4 | # |
Paul Smith | 4f19336 | 2006-03-05 17:14:10 -0500 | [diff] [blame] | 5 | # This file is included by the global makefile so that you can add your own |
| 6 | # architecture-specific flags and dependencies. |
| 7 | # |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | |
Adrian Bunk | 7622b46 | 2008-04-22 00:33:02 +0300 | [diff] [blame] | 9 | KBUILD_DEFCONFIG := m32700ut.smp_defconfig |
| 10 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | LDFLAGS := |
| 12 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
Hirokazu Takata | 3d60f84 | 2007-02-10 01:43:39 -0800 | [diff] [blame] | 13 | LDFLAGS_vmlinux := |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 15 | KBUILD_CFLAGS += -pipe -fno-schedule-insns |
Sam Ravnborg | 80c00ba | 2010-07-28 19:11:27 +0200 | [diff] [blame] | 16 | KBUILD_CFLAGS_KERNEL += -mmodel=medium |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 17 | KBUILD_CFLAGS_MODULE += -mmodel=large |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | ifdef CONFIG_CHIP_VDEC2 |
| 20 | cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst |
Hirokazu Takata | cde05cf | 2006-02-24 13:03:50 -0800 | [diff] [blame] | 21 | aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | else |
| 23 | cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 |
Hirokazu Takata | cde05cf | 2006-02-24 13:03:50 -0800 | [diff] [blame] | 24 | aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | endif |
| 26 | |
| 27 | cflags-$(CONFIG_ISA_M32R) += -DNO_FPU |
Hirokazu Takata | cde05cf | 2006-02-24 13:03:50 -0800 | [diff] [blame] | 28 | aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 30 | KBUILD_CFLAGS += $(cflags-y) |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 31 | KBUILD_AFLAGS += $(aflags-y) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
Al Viro | c74dbac | 2005-09-26 06:19:28 +0100 | [diff] [blame] | 33 | CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
Thomas Gleixner | 7433c5c | 2012-05-03 09:02:54 +0000 | [diff] [blame] | 35 | head-y := arch/m32r/kernel/head.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 37 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
| 39 | libs-y += arch/m32r/lib/ $(LIBGCC) |
| 40 | core-y += arch/m32r/kernel/ \ |
| 41 | arch/m32r/mm/ \ |
Hirokazu Takata | 3264f97 | 2007-08-01 21:09:31 +0900 | [diff] [blame] | 42 | arch/m32r/boot/ \ |
| 43 | arch/m32r/platforms/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
| 45 | drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/ |
| 46 | |
| 47 | boot := arch/m32r/boot |
| 48 | |
Paul Smith | 4f19336 | 2006-03-05 17:14:10 -0500 | [diff] [blame] | 49 | PHONY += zImage |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | |
| 51 | all: zImage |
| 52 | |
| 53 | zImage: vmlinux |
| 54 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 55 | |
| 56 | compressed: zImage |
| 57 | |
| 58 | archclean: |
| 59 | $(Q)$(MAKE) $(clean)=$(boot) |
| 60 | |
| 61 | define archhelp |
| 62 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' |
| 63 | endef |