1 # $NetBSD
: Makefile.arm
,v
1.31 2008/01/26 02:06:04 chris Exp $
5 # This makefile is constructed from a machine description
:
7 # Most changes should be made in the machine description
8 #
/sys
/arch
/<arch
>/conf
/``machineid''
9 # after which you should do
11 # Machine generic makefile changes should be made in
12 #
/sys
/arch
/arm
/conf
/Makefile.arm
13 # after which config should be rerun for all machines of that type.
15 # To specify debugging
, add the config line
: makeoptions DEBUG
="-g"
16 # A better way is to specify
-g only for a few files.
18 # makeoptions DEBUGLIST
="uvm* trap if_*"
21 NEED_OWN_INSTALL_TARGET?
=no
25 ##
(1) port identification
27 THISARM
= $S
/arch
/$
{MACHINE
}
29 GENASSYM_CONF
= $
{ARM
}/arm32
/genassym.cf
30 .
-include
"$S/arch/${MACHINE}/conf/Makefile.${MACHINE}.inc"
33 ##
(2) compile settings
35 # CPPFLAGS set by platform
-specific Makefile fragment.
36 AFLAGS
+= -x assembler
-with
-cpp
39 ##
(3) libkern
and compat
44 ##
(4) local objects
, compile rules
, and dependencies
46 MD_OBJS
+= $
{SYSTEM_FIRST_OBJ
} locore.o
48 MD_SFILES
+= $
{SYSTEM_FIRST_SFILE
} $
{ARM
}/arm32
/locore.S
50 .if defined
(SYSTEM_FIRST_OBJ
)
51 $
{SYSTEM_FIRST_OBJ
}: $
{SYSTEM_FIRST_SFILE
} assym.h
55 locore.o
: $
{ARM
}/arm32
/locore.S assym.h
61 LOADADDRESS?
= 0xF0000000
63 # Strip ARM mapping symbols from the kernel image
, as they interfere
64 # with ddb. Do it differently if 'makeoptions DEBUG
="-g"' was specified.
65 .if
!defined
(DEBUG
) || empty
(DEBUG
:M
-g
*)
66 SYSTEM_LD_TAIL?
= @$
{OBJCOPY
} --strip
-symbol
='$$a' \
67 --strip
-symbol
='$$t' \
68 --strip
-symbol
='$$d' $@ ;\
69 $
{SIZE
} $@; chmod
755 $@
71 STRIPFLAGS
=-g
--strip
-symbol
='$$a'
--strip
-symbol
='$$t'
--strip
-symbol
='$$d'
75 ##
(6) port specific target dependencies
78 # depend on CPU configuration
79 cpufunc.o cpufunc_asm.o
: Makefile
81 # depend on DIAGNOSTIC etc.
82 cpuswitch.o fault.o machdep.o
: Makefile
84 # various assembly files that depend on assym.h
85 atomic.o bcopy_page.o bcopyinout.o copystr.o cpuswitch.o cpu_in_cksum.o
: assym.h
86 exception.o fiq_subr.o fusu.o irq_dispatch.o isa_irq.o sigcode.o
: assym.h
87 spl.o vectors.o
: assym.h
94 ##
(8) config
(8) generated machinery
109 ##
(9) port independent kernel machinery
111 .include
"$S/conf/Makefile.kern.inc"
114 ##
(10) Appending make options.