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