blob: 073bba6f9f60a7f083781689bd198f387130a1ea [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
11cflags-$(CONFIG_CPU_H8300H) := -mh
12aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h
13ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux
14cflags-$(CONFIG_CPU_H8S) := -ms
15aflags-$(CONFIG_CPU_H8S) := -ms -Wa,--mach=h8300s
16ldflags-$(CONFIG_CPU_H8S) := -mh8300self_linux
17
18KBUILD_CFLAGS += $(cflags-y)
19KBUILD_CFLAGS += -mint32 -fno-builtin
20KBUILD_CFLAGS += -D__linux__
21KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
22KBUILD_AFLAGS += $(aflags-y)
23LDFLAGS += $(ldflags-y)
24
Javier Martinez Canillas3bc27cd2015-10-16 13:31:27 +020025ifeq ($(CROSS_COMPILE),)
Masahiro Yamada0140f0d2019-02-15 13:04:26 +090026CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
Javier Martinez Canillas3bc27cd2015-10-16 13:31:27 +020027endif
Yoshinori Sato8dbdef22015-05-08 23:23:18 +090028
29core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
30ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
31core-y += arch/h8300/boot/dts/
32endif
33
34libs-y += arch/$(ARCH)/lib/
35
36boot := arch/h8300/boot
37
38%.dtb %.dtb.S %.dtb.o: | scripts
39 $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
40
41PHONY += dtbs
42dtbs: scripts
43 $(Q)$(MAKE) $(build)=arch/h8300/boot/dts
44
45archmrproper:
46
47archclean:
48 $(Q)$(MAKE) $(clean)=$(boot)
49
50vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
51 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
52
53define archhelp
54 @echo 'vmlinux.bin - Create raw binary'
55 @echo 'vmlinux.srec - Create srec binary'
56 @echo 'zImage - Compressed kernel image'
57endef