Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 1 | # |
| 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 Dunlap | 7b291be | 2018-07-18 23:04:29 -0700 | [diff] [blame] | 11 | KBUILD_DEFCONFIG := edosk2674_defconfig |
| 12 | |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 13 | cflags-$(CONFIG_CPU_H8300H) := -mh |
| 14 | aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h |
| 15 | ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux |
| 16 | cflags-$(CONFIG_CPU_H8S) := -ms |
| 17 | aflags-$(CONFIG_CPU_H8S) := -ms -Wa,--mach=h8300s |
| 18 | ldflags-$(CONFIG_CPU_H8S) := -mh8300self_linux |
| 19 | |
| 20 | KBUILD_CFLAGS += $(cflags-y) |
| 21 | KBUILD_CFLAGS += -mint32 -fno-builtin |
| 22 | KBUILD_CFLAGS += -D__linux__ |
| 23 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" |
| 24 | KBUILD_AFLAGS += $(aflags-y) |
Masahiro Yamada | d503ac5 | 2018-08-24 08:20:39 +0900 | [diff] [blame] | 25 | KBUILD_LDFLAGS += $(ldflags-y) |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 26 | |
Luc Van Oostenryck | 1b803a3 | 2018-05-30 23:03:43 +0200 | [diff] [blame] | 27 | CHECKFLAGS += -msize-long |
| 28 | |
Javier Martinez Canillas | 3bc27cd | 2015-10-16 13:31:27 +0200 | [diff] [blame] | 29 | ifeq ($(CROSS_COMPILE),) |
Masahiro Yamada | fc2b47b | 2019-02-15 13:04:26 +0900 | [diff] [blame] | 30 | CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-) |
Javier Martinez Canillas | 3bc27cd | 2015-10-16 13:31:27 +0200 | [diff] [blame] | 31 | endif |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 32 | |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 33 | libs-y += arch/$(ARCH)/lib/ |
| 34 | |
| 35 | boot := arch/h8300/boot |
| 36 | |
Yoshinori Sato | 8dbdef2 | 2015-05-08 23:23:18 +0900 | [diff] [blame] | 37 | vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux |
| 38 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 39 | |
| 40 | define archhelp |
| 41 | @echo 'vmlinux.bin - Create raw binary' |
| 42 | @echo 'vmlinux.srec - Create srec binary' |
| 43 | @echo 'zImage - Compressed kernel image' |
| 44 | endef |