blob: 807f41e60ee4a5b06f9494f3d4f11ae6aad22151 [file] [log] [blame]
Yoshinori Sato8dbdef22015-05-08 23:23:18 +09001#
2# arch/h8300/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8# (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp>
9#
10
Randy Dunlap7b291be2018-07-18 23:04:29 -070011KBUILD_DEFCONFIG := edosk2674_defconfig
12
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090013cflags-$(CONFIG_CPU_H8300H) := -mh
14aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h
15ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux
16cflags-$(CONFIG_CPU_H8S) := -ms
17aflags-$(CONFIG_CPU_H8S) := -ms -Wa,--mach=h8300s
18ldflags-$(CONFIG_CPU_H8S) := -mh8300self_linux
19
20KBUILD_CFLAGS += $(cflags-y)
21KBUILD_CFLAGS += -mint32 -fno-builtin
22KBUILD_CFLAGS += -D__linux__
23KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
24KBUILD_AFLAGS += $(aflags-y)
Masahiro Yamadad503ac52018-08-24 08:20:39 +090025KBUILD_LDFLAGS += $(ldflags-y)
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090026
Luc Van Oostenryck1b803a32018-05-30 23:03:43 +020027CHECKFLAGS += -msize-long
28
Javier Martinez Canillas3bc27cd2015-10-16 13:31:27 +020029ifeq ($(CROSS_COMPILE),)
Masahiro Yamadafc2b47b2019-02-15 13:04:26 +090030CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
Javier Martinez Canillas3bc27cd2015-10-16 13:31:27 +020031endif
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090032
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090033libs-y += arch/$(ARCH)/lib/
34
35boot := arch/h8300/boot
36
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090037vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
38 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
39
40define archhelp
41 @echo 'vmlinux.bin - Create raw binary'
42 @echo 'vmlinux.srec - Create srec binary'
43 @echo 'zImage - Compressed kernel image'
44endef