blob: 0d2d96e52d9fed374928fdd0be0466aca66827f1 [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
25CROSS_COMPILE := h8300-unknown-linux-
26
27core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
28ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
29core-y += arch/h8300/boot/dts/
30endif
31
32libs-y += arch/$(ARCH)/lib/
33
34boot := arch/h8300/boot
35
36%.dtb %.dtb.S %.dtb.o: | scripts
37 $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
38
39PHONY += dtbs
40dtbs: scripts
41 $(Q)$(MAKE) $(build)=arch/h8300/boot/dts
42
43archmrproper:
44
45archclean:
46 $(Q)$(MAKE) $(clean)=$(boot)
47
48vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
49 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
50
51define archhelp
52 @echo 'vmlinux.bin - Create raw binary'
53 @echo 'vmlinux.srec - Create srec binary'
54 @echo 'zImage - Compressed kernel image'
55endef