MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / arch / h8300 / Makefile
blob5c6d67116545a3af6ebf87111c1d3c0e21efa6fd
2 # arch/h8300/Makefile
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.
8 # (C) Copyright 2002,2003 Yoshinori Sato <ysato@users.sourceforge.jp>
10 ifndef include-config
11 -include $(TOPDIR)/.config
12 endif
14 platform-$(CONFIG_CPU_H8300H) := h8300h
15 platform-$(CONFIG_CPU_H8S) := h8s
16 PLATFORM := $(platform-y)
18 board-$(CONFIG_H8300H_GENERIC) := generic
19 board-$(CONFIG_H8300H_AKI3068NET) := aki3068net
20 board-$(CONFIG_H8300H_H8MAX) := h8max
21 board-$(CONFIG_H8300H_SIM) := generic
22 board-$(CONFIG_H8S_GENERIC) := generic
23 board-$(CONFIG_H8S_EDOSK2674) := edosk2674
24 board-$(CONFIG_H8S_SIM) := generic
25 BOARD := $(board-y)
27 model-$(CONFIG_RAMKERNEL) := ram
28 model-$(CONFIG_ROMKERNEL) := rom
29 MODEL := $(model-y)
31 cflags-$(CONFIG_CPU_H8300H) := -mh
32 ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf
33 cflags-$(CONFIG_CPU_H8S) := -ms
34 ldflags-$(CONFIG_CPU_H8S) := -mh8300self
36 CFLAGS += $(cflags-y)
37 CFLAGS += -mint32 -fno-builtin
38 CFLAGS += -g
39 CFLAGS += -D__linux__
40 CFLAGS += -DUTS_SYSNAME=\"uClinux\"
41 AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
42 LDFLAGS += $(ldflags-y)
44 CROSS_COMPILE = h8300-elf-
45 LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name)
47 head-y := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
49 core-y += arch/$(ARCH)/kernel/ \
50 arch/$(ARCH)/mm/ \
51 arch/$(ARCH)/platform/$(PLATFORM)/ \
52 arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/
54 libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
56 boot := arch/h8300/boot
58 export MODEL PLATFORM BOARD
60 archmrproper:
62 archclean:
63 $(Q)$(MAKE) $(clean)=$(boot)
65 prepare: include/asm-$(ARCH)/asm-offsets.h
67 include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
68 include/asm include/linux/version.h
69 $(call filechk,gen-asm-offsets)
71 vmlinux.srec vmlinux.bin: vmlinux
72 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
74 define archhelp
75 echo 'vmlinux.bin - Create raw binary'
76 echo 'vmlinux.srec - Create srec binary'
77 endef
79 CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h