# BRCM_VERSION=3
[bcm963xx.git] / kernel / linux / arch / arm26 / Makefile
1 #
2 # arch/arm26/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 # Copyright (C) 1995-2001 by Russell King
9
10 LDFLAGS_vmlinux :=-p -X
11 LDFLAGS_BLOB    :=--format binary
12 AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
13 OBJCOPYFLAGS    :=-O binary -R .note -R .comment -S
14 GZFLAGS         :=-9
15
16 ifeq ($(CONFIG_FRAME_POINTER),y)
17 CFLAGS          +=-fno-omit-frame-pointer -mno-sched-prolog
18 endif
19
20 ifeq ($(CONFIG_DEBUG_INFO),y)
21 CFLAGS          +=-g
22 endif
23
24 # Force -mno-fpu to be passed to the assembler.  Some versions of gcc don't
25 # do this with -msoft-float
26 CFLAGS_BOOT     :=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
27 CFLAGS          +=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
28 AFLAGS          +=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu
29
30 head-y          := arch/arm26/machine/head.o arch/arm26/kernel/init_task.o
31 LDFLAGS_BLOB    += --oformat elf32-littlearm
32
33 ifeq ($(CONFIG_XIP_KERNEL),y)
34   TEXTADDR       := 0x03880000
35   DATAADDR       := 0x02080000
36 else
37   TEXTADDR       := 0x02080000
38   DATAADDR       := .
39 endif
40
41 ifeq ($(incdir-y),)
42 incdir-y :=
43 endif
44 INCDIR   :=
45   
46 export  MACHINE TEXTADDR GZFLAGS CFLAGS_BOOT
47
48 # If we have a machine-specific directory, then include it in the build.
49 core-y                          += arch/arm26/kernel/ arch/arm26/mm/ arch/arm26/machine/
50 core-$(CONFIG_FPE_NWFPE)        += arch/arm26/nwfpe/
51
52 libs-y                          += arch/arm26/lib/
53
54 # Default target when executing plain make
55 all: zImage
56
57 boot := arch/arm26/boot
58
59 prepare: include/asm-$(ARCH)/asm_offsets.h
60 CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
61
62
63 .PHONY: maketools FORCE
64 maketools: FORCE
65         
66
67 # Convert bzImage to zImage
68 bzImage: vmlinux
69         $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
70
71 zImage Image bootpImage xipImage: vmlinux
72         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
73
74 zinstall install: vmlinux
75         $(Q)$(MAKE) $(build)=$(boot) $@
76
77 # We use MRPROPER_FILES and CLEAN_FILES now
78 archclean:
79         $(Q)$(MAKE) $(clean)=$(boot)
80
81 # My testing targets (that short circuit a few dependencies)
82 zImg:;  $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
83 Img:;   $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
84 bp:;    $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
85 i:;     $(Q)$(MAKE) $(build)=$(boot) install
86 zi:;    $(Q)$(MAKE) $(build)=$(boot) zinstall
87
88 #
89 # Configuration targets.  Use these to select a
90 # configuration for your architecture
91 %_config:
92         @( \
93         CFG=$(@:_config=); \
94         if [ -f arch/arm26/def-configs/$$CFG ]; then \
95           [ -f .config ] && mv -f .config .config.old; \
96           cp arch/arm26/def-configs/$$CFG .config; \
97           echo "*** Default configuration for $$CFG installed"; \
98           echo "*** Next, you may run 'make oldconfig'"; \
99         else \
100           echo "$$CFG does not exist"; \
101         fi; \
102         )
103
104 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
105                                    include/config/MARKER
106
107 include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
108         $(call filechk,gen-asm-offsets)
109
110 define archhelp
111   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
112   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
113   echo  '  bootpImage    - Combined zImage and initial RAM disk' 
114   echo  '  initrd        - Create an initial image'
115   echo  '  install       - Install uncompressed kernel'
116   echo  '  zinstall      - Install compressed kernel'
117   echo  '                  Install using (your) ~/bin/installkernel or'
118   echo  '                  (distribution) /sbin/installkernel or'
119   echo  '                  install to $$(INSTALL_PATH) and run lilo'
120 endef