Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [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,2003 Yoshinori Sato <ysato@users.sourceforge.jp> |
| 9 | # |
| 10 | |
| 11 | platform-$(CONFIG_CPU_H8300H) := h8300h |
| 12 | platform-$(CONFIG_CPU_H8S) := h8s |
| 13 | PLATFORM := $(platform-y) |
| 14 | |
| 15 | board-$(CONFIG_H8300H_GENERIC) := generic |
| 16 | board-$(CONFIG_H8300H_AKI3068NET) := aki3068net |
| 17 | board-$(CONFIG_H8300H_H8MAX) := h8max |
| 18 | board-$(CONFIG_H8300H_SIM) := generic |
| 19 | board-$(CONFIG_H8S_GENERIC) := generic |
| 20 | board-$(CONFIG_H8S_EDOSK2674) := edosk2674 |
| 21 | board-$(CONFIG_H8S_SIM) := generic |
| 22 | BOARD := $(board-y) |
| 23 | |
| 24 | model-$(CONFIG_RAMKERNEL) := ram |
| 25 | model-$(CONFIG_ROMKERNEL) := rom |
| 26 | MODEL := $(model-y) |
| 27 | |
| 28 | cflags-$(CONFIG_CPU_H8300H) := -mh |
| 29 | ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf |
| 30 | cflags-$(CONFIG_CPU_H8S) := -ms |
| 31 | ldflags-$(CONFIG_CPU_H8S) := -mh8300self |
| 32 | |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 33 | KBUILD_CFLAGS += $(cflags-y) |
| 34 | KBUILD_CFLAGS += -mint32 -fno-builtin |
| 35 | KBUILD_CFLAGS += -g |
| 36 | KBUILD_CFLAGS += -D__linux__ |
| 37 | KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 38 | KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | LDFLAGS += $(ldflags-y) |
| 40 | |
| 41 | CROSS_COMPILE = h8300-elf- |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 42 | LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | |
Yoshinori Sato | c728d60 | 2007-05-06 14:50:35 -0700 | [diff] [blame] | 44 | head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
| 46 | core-y += arch/$(ARCH)/kernel/ \ |
| 47 | arch/$(ARCH)/mm/ |
| 48 | ifdef PLATFORM |
| 49 | core-y += arch/$(ARCH)/platform/$(PLATFORM)/ \ |
| 50 | arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/ |
| 51 | endif |
| 52 | |
| 53 | libs-y += arch/$(ARCH)/lib/ $(LIBGCC) |
| 54 | |
| 55 | boot := arch/h8300/boot |
| 56 | |
| 57 | export MODEL PLATFORM BOARD |
| 58 | |
| 59 | archmrproper: |
| 60 | |
| 61 | archclean: |
| 62 | $(Q)$(MAKE) $(clean)=$(boot) |
| 63 | |
Yoshinori Sato | 86277d5 | 2007-07-15 23:38:35 -0700 | [diff] [blame] | 64 | vmlinux.srec vmlinux.bin zImage: vmlinux |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 66 | |
| 67 | define archhelp |
Yoshinori Sato | 86277d5 | 2007-07-15 23:38:35 -0700 | [diff] [blame] | 68 | @echo 'vmlinux.bin - Create raw binary' |
| 69 | @echo 'vmlinux.srec - Create srec binary' |
| 70 | @echo 'zImage - Compressed kernel image' |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | endef |