Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # m32r/Makefile |
| 3 | # |
Paul Smith | 4f19336 | 2006-03-05 17:14:10 -0500 | [diff] [blame] | 4 | # This file is included by the global makefile so that you can add your own |
| 5 | # architecture-specific flags and dependencies. |
| 6 | # |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
| 8 | LDFLAGS := |
| 9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
| 10 | LDFLAGS_vmlinux := -e startup_32 |
| 11 | |
| 12 | CFLAGS += -pipe -fno-schedule-insns |
| 13 | CFLAGS_KERNEL += -mmodel=medium |
| 14 | CFLAGS_MODULE += -mmodel=large |
| 15 | |
| 16 | ifdef CONFIG_CHIP_VDEC2 |
| 17 | cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -Wa,-bitinst |
Hirokazu Takata | cde05cf | 2006-02-24 13:03:50 -0800 | [diff] [blame] | 18 | aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -O2 -Wa,-bitinst -Wa,-no-parallel |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | else |
| 20 | cflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 |
Hirokazu Takata | cde05cf | 2006-02-24 13:03:50 -0800 | [diff] [blame] | 21 | aflags-$(CONFIG_ISA_M32R2) += -DNO_FPU -m32r2 -O2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | endif |
| 23 | |
| 24 | cflags-$(CONFIG_ISA_M32R) += -DNO_FPU |
Hirokazu Takata | cde05cf | 2006-02-24 13:03:50 -0800 | [diff] [blame] | 25 | aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
| 27 | CFLAGS += $(cflags-y) |
| 28 | AFLAGS += $(aflags-y) |
| 29 | |
Al Viro | c74dbac | 2005-09-26 06:19:28 +0100 | [diff] [blame] | 30 | CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | |
| 32 | head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o |
| 33 | |
| 34 | LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) |
| 35 | |
| 36 | libs-y += arch/m32r/lib/ $(LIBGCC) |
| 37 | core-y += arch/m32r/kernel/ \ |
| 38 | arch/m32r/mm/ \ |
| 39 | arch/m32r/boot/ |
| 40 | |
| 41 | drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/ |
| 42 | |
| 43 | boot := arch/m32r/boot |
| 44 | |
Paul Smith | 4f19336 | 2006-03-05 17:14:10 -0500 | [diff] [blame] | 45 | PHONY += zImage |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | |
| 47 | all: zImage |
| 48 | |
| 49 | zImage: vmlinux |
| 50 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 51 | |
| 52 | compressed: zImage |
| 53 | |
| 54 | archclean: |
| 55 | $(Q)$(MAKE) $(clean)=$(boot) |
| 56 | |
| 57 | define archhelp |
| 58 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' |
| 59 | endef |