patch-2_6_7-vs1_9_1_12
[linux-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,2003 Yoshinori Sato <ysato@users.sourceforge.jp>
9 #
10 ifndef include-config
11 -include $(TOPDIR)/.config
12 endif
13
14 platform-$(CONFIG_CPU_H8300H)   := h8300h
15 platform-$(CONFIG_CPU_H8S)      := h8s
16 PLATFORM := $(platform-y)
17
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)
26
27 model-$(CONFIG_RAMKERNEL)       := ram
28 model-$(CONFIG_ROMKERNEL)       := rom
29 MODEL := $(model-y)
30
31 cflags-$(CONFIG_CPU_H8300H)     := -mh
32 ldflags-$(CONFIG_CPU_H8300H)    := -mh8300helf
33 cflags-$(CONFIG_CPU_H8S)        := -ms
34 ldflags-$(CONFIG_CPU_H8S)       := -mh8300self
35
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)
43
44 CROSS_COMPILE = h8300-elf-
45 LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name)
46
47 head-y := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
48
49 core-y  += arch/$(ARCH)/kernel/ \
50            arch/$(ARCH)/mm/ \
51            arch/$(ARCH)/platform/$(PLATFORM)/ \
52            arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/
53
54 libs-y  += arch/$(ARCH)/lib/ $(LIBGCC)
55
56 boot := arch/h8300/boot
57
58 export MODEL PLATFORM BOARD
59
60 archmrproper:
61
62 archclean:
63         $(Q)$(MAKE) $(clean)=$(boot)
64
65 prepare: include/asm-$(ARCH)/asm-offsets.h
66
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)
70
71 vmlinux.srec vmlinux.bin: vmlinux
72         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
73
74 define archhelp
75   echo  'vmlinux.bin  - Create raw binary'
76   echo  'vmlinux.srec - Create srec binary'
77 endef
78
79 CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h