Merge tag 'for-linus-4.19b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / h8300 / Makefile
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
11 KBUILD_DEFCONFIG := edosk2674_defconfig
12
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)
25 LDFLAGS += $(ldflags-y)
26
27 CHECKFLAGS += -msize-long
28
29 ifeq ($(CROSS_COMPILE),)
30 CROSS_COMPILE := h8300-unknown-linux-
31 endif
32
33 core-y  += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
34 ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
35 core-y += arch/h8300/boot/dts/
36 endif
37
38 libs-y  += arch/$(ARCH)/lib/
39
40 boot := arch/h8300/boot
41
42 %.dtb %.dtb.S %.dtb.o: | scripts
43         $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
44
45 PHONY += dtbs
46 dtbs: scripts
47         $(Q)$(MAKE) $(build)=arch/h8300/boot/dts
48
49 archmrproper:
50
51 archclean:
52         $(Q)$(MAKE) $(clean)=$(boot)
53
54 vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
55         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
56
57 define archhelp
58   @echo  'vmlinux.bin  - Create raw binary'
59   @echo  'vmlinux.srec - Create srec binary'
60   @echo  'zImage       - Compressed kernel image'
61 endef