4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" and "archdep" for cleaning up and making dependencies for
9 # This file is subject to the terms and conditions of the GNU General Public
10 # License. See the file "COPYING" in the main directory of this archive
13 # Copyright (C) 1995-1999 by Russell King
15 OBJCOPY
:= $(CROSS_COMPILE
)objcopy
-O binary
-R .note
-R .comment
-S
17 LINKFLAGS
:= -p
-X
-T arch
/arm
/vmlinux.lds
18 ARCHCC
:= $(word 1,$(CC
))
22 CFLAGS
:= $(CFLAGS
) $(CFLAGS_PIPE
) -msoft-float
24 ifdef CONFIG_FRAME_POINTER
25 CFLAGS
:= $(CFLAGS
:-fomit-frame-pointer
=)
28 ifdef CONFIG_DEBUG_INFO
34 # Ensure this is ld "2.9.4" or later
35 NEW_LINKER
:= $(shell if
$(LD
) --gc-sections
--version
>/dev
/null
2>&1; then echo y
; else echo n
; fi
)
37 ifneq ($(NEW_LINKER
),y
)
38 dummy
:; @echo
'*** ${VERSION}.${PATCHLEVEL} kernels no longer build correctly with old versions of binutils.'
39 @echo
'*** Please upgrade your binutils to 2.9.5.'
43 # GCC 2.7 uses different options to later compilers; sort out which we have
44 NEW_GCC
:= $(shell if
$(CC
) --version
2>&1 | grep
'^2\.7' > /dev
/null
; then echo n
; else echo y
; fi
)
47 # select flags depending on the compiler
50 CFLAGS
+= -mshort-load-bytes
51 CFLAGS_PROC_CPU_26
:= -mcpu
=arm3
-Os
52 CFLAGS_PROC_CPU_32v3
:= -march
=armv3
53 CFLAGS_PROC_CPU_32v4
:= -march
=armv4
54 CFLAGS_ARM6
:= -mtune
=arm6
55 CFLAGS_ARM7
:= -mtune
=arm7
56 CFLAGS_ARM720
:= -mtune
=arm7tdmi
57 CFLAGS_SA110
:= -mtune
=strongarm110
59 CFLAGS
+= -DNO_TEXT_SECTIONS
60 CFLAGS_PROC_CPU_26
:= -m3
61 CFLAGS_PROC_CPU_32v3
:=
62 CFLAGS_PROC_CPU_32v4
:=
70 # Select CPU dependent flags
72 ifeq ($(CONFIG_CPU_26
),y
)
75 CFLAGS
+= $(CFLAGS_PROC_CPU_26
)
79 ifeq ($(CONFIG_CPU_32
),y
)
82 ifeq ($(CONFIG_CPU_32v4
),y
)
83 CFLAGS
+= $(CFLAGS_PROC_CPU_32v4
)
84 AFLAGS
+= -mapcs-32
-marmv4
86 CFLAGS
+= $(CFLAGS_PROC_CPU_32v3
)
87 AFLAGS
+= -mapcs-32
-marmv3m
90 # Exactly one of the following must be selected
92 ifeq ($(CONFIG_CPU_ARM6
),y
)
93 CFLAGS
+= $(CFLAGS_ARM6
)
95 ifeq ($(CONFIG_CPU_ARM7
),y
)
96 CFLAGS
+= $(CFLAGS_ARM7
)
98 ifeq ($(CONFIG_CPU_ARM720
),y
)
99 CFLAGS
+= $(CFLAGS_ARM720
)
101 ifeq ($(CONFIG_CPU_SA110
),y
)
102 CFLAGS
+= $(CFLAGS_SA110
)
104 ifeq ($(CONFIG_CPU_SA1100
),y
)
105 CFLAGS
+= $(CFLAGS_SA110
)
113 LIBGCC
:= $(shell $(CC
) $(CFLAGS
) --print-libgcc-file-name
)
115 export LIBGCC MACHINE PROCESSOR TEXTADDR GZFLAGS
117 ifeq ($(CONFIG_ARCH_ARCA5K
),y
)
122 ifeq ($(CONFIG_ARCH_RPC
),y
)
127 ifeq ($(CONFIG_ARCH_EBSA110
),y
)
132 ifeq ($(CONFIG_ARCH_CLPS7500
),y
)
137 ifeq ($(CONFIG_FOOTBRIDGE
),y
)
142 ifeq ($(CONFIG_ARCH_CO285
),y
)
143 TEXTADDR
= 0x60008000
146 ifeq ($(CONFIG_ARCH_NEXUSPCI
),y
)
151 ifeq ($(CONFIG_ARCH_SHARK
),y
)
156 ifeq ($(CONFIG_ARCH_SA1100
),y
)
161 ifeq ($(CONFIG_ARCH_L7200
),y
)
166 HEAD
:= arch
/arm
/kernel
/head-
$(PROCESSOR
).o \
167 arch
/arm
/kernel
/init_task.o
168 SUBDIRS
+= arch
/arm
/kernel arch
/arm
/mm arch
/arm
/lib \
169 arch
/arm
/special arch
/arm
/nwfpe
170 CORE_FILES
:= arch
/arm
/kernel
/kernel.o arch
/arm
/mm
/mm.o
$(CORE_FILES
)
171 LIBS
:= arch
/arm
/lib
/lib.o arch
/arm
/lib
/lib.a
$(LIBS
) $(LIBGCC
)
172 DRIVERS
+= arch
/arm
/special
/special.a
174 ifeq ($(CONFIG_NWFPE
),y
)
175 LIBS
:= arch
/arm
/nwfpe
/math-emu.o
$(LIBS
)
178 ifeq ($(CONFIG_ARCH_ACORN
),y
)
179 SUBDIRS
+= drivers
/acorn
180 DRIVERS
+= drivers
/acorn
/block
/acorn-block.a
181 DRIVERS
+= drivers
/acorn
/char
/acorn-char.o
182 DRIVERS
+= drivers
/acorn
/net
/acorn-net.o
183 DRIVERS
+= drivers
/acorn
/scsi
/acorn-scsi.a
186 ifeq ($(CONFIG_ARCH_CLPS7500
),y
)
187 SUBDIRS
+= drivers
/acorn
/char
188 DRIVERS
+= drivers
/acorn
/char
/acorn-char.o
191 MAKEBOOT
= $(MAKE
) -C arch
/$(ARCH
)/boot
193 # The following is a hack to get 'constants.h' up
194 # to date before starting compilation
196 $(patsubst %, _dir_
%, $(SUBDIRS
)) : constants
198 constants
: $(TOPDIR
)/include/asm-arm
/proc-fns.h dummy
199 @
$(MAKE
) -C arch
/arm
/lib constants.h
201 symlinks
: archsymlinks
204 $(RM
) include/asm-arm
/arch
include/asm-arm
/proc
205 (cd
include/asm-arm
; ln
-sf arch-
$(ARCHDIR
) arch
; ln
-sf proc-
$(PROCESSOR
) proc
)
207 vmlinux
: arch
/arm
/vmlinux.lds
209 arch
/arm
/vmlinux.lds
: arch
/arm
/vmlinux-
$(PROCESSOR
).lds.in dummy
210 @sed
's/TEXTADDR/$(TEXTADDR)/' <$< >$@
212 arch
/arm
/kernel
: dummy
213 $(MAKE
) linuxsubdirs SUBDIRS
=arch
/arm
/kernel
216 $(MAKE
) linuxsubdirs SUBDIRS
=arch
/arm
/mm
219 $(MAKE
) linuxsubdirs SUBDIRS
=arch
/arm
/lib
221 zImage zinstall Image
install: vmlinux
225 @
$(MAKE
) -C arch
/$(ARCH
)/special mrproper
226 $(RM
) include/asm-arm
/arch
include/asm-arm
/proc
230 $(RM
) arch
/arm
/lib
/constants.h arch
/arm
/vmlinux.lds
235 # My testing targets (that short circuit a few dependencies)
236 zImg
:; @
$(MAKEBOOT
) zImage
237 Img
:; @
$(MAKEBOOT
) Image
238 i
:; @
$(MAKEBOOT
) install
239 zi
:; @
$(MAKEBOOT
) zinstall
242 # Configuration targets. Use these to select a
243 # configuration for your architecture
246 $(RM
) arch
/arm
/defconfig
247 cp arch
/arm
/def-configs
/a5k arch
/arm
/defconfig
250 $(RM
) arch
/arm
/defconfig
251 cp arch
/arm
/def-configs
/ebsa110 arch
/arm
/defconfig
254 $(RM
) arch
/arm
/defconfig
255 cp arch
/arm
/def-configs
/footbridge arch
/arm
/defconfig
258 $(RM
) arch
/arm
/defconfig
259 cp arch
/arm
/def-configs
/rpc arch
/arm
/defconfig
262 $(RM
) arch
/arm
/defconfig
263 cp arch
/arm
/def-configs
/brutus arch
/arm
/defconfig
266 $(RM
) arch
/arm
/defconfig
267 cp arch
/arm
/def-configs
/victor arch
/arm
/defconfig
270 $(RM
) arch
/arm
/defconfig
271 cp arch
/arm
/def-configs
/empeg arch
/arm
/defconfig
274 $(RM
) arch
/arm
/defconfig
275 cp arch
/arm
/def-configs
/thinclient arch
/arm
/defconfig
278 $(RM
) arch
/arm
/defconfig
279 cp arch
/arm
/def-configs
/assabet arch
/arm
/defconfig
282 $(RM
) arch
/arm
/defconfig
283 cp arch
/arm
/def-configs
/lart arch
/arm
/defconfig
286 $(RM
) arch
/arm
/defconfig
287 cp arch
/arm
/def-configs
/lusl7200 arch
/arm
/defconfig