xref: /netbsd-src/sys/arch/sh3/conf/Makefile.sh3 (revision 6de51c519f1b899da63c1bf576f478920b89083f)
1#	$NetBSD: Makefile.sh3,v 1.27 2011/01/21 15:59:09 joerg Exp $
2
3# Makefile for NetBSD
4#
5# This makefile is constructed from a machine description:
6#	config machineid
7# Most changes should be made in the machine description
8#	/sys/arch/<machine>/conf/``machineid''
9# after which you should do
10#	config machineid
11# CPU generic makefile changes should be made in
12#	/sys/arch/sh3/conf/Makefile.sh3
13# after which config should be rerun for all machines of that type.
14#
15# To specify debugging, add the config line: makeoptions DEBUG="-g"
16# A better way is to specify -g only for a few files.
17#
18#	makeoptions DEBUGLIST="uvm* trap if_*"
19
20USETOOLS?=	no
21NEED_OWN_INSTALL_TARGET?=no
22.include <bsd.own.mk>
23
24##
25## (1) port identification
26##
27THISSH3=	$S/arch/${MACHINE}
28SH3=		$S/arch/sh3
29GENASSYM_CONF=	${SH3}/sh3/genassym.cf
30.-include "${THISSH3}/conf/Makefile.${MACHINE}.inc"
31
32##
33## (2) compile settings
34##
35CPPFLAGS+=	-D${MACHINE}
36AFLAGS+=	-x assembler-with-cpp
37# -O2 is too -falign-* zealous for low-memory sh3 machines
38COPTS?=		-Os -freorder-blocks
39
40##
41## (3) libkern and compat
42##
43
44##
45## (4) local objects, compile rules, and dependencies
46##
47MD_OBJS=	locore.o
48MD_CFILES=
49MD_SFILES=	${THISSH3}/${MACHINE}/locore.S
50
51locore.o: ${THISSH3}/${MACHINE}/locore.S assym.h
52	${NORMAL_S}
53
54cpu_in_cksum.o exception_vector.o locore_subr.o: assym.h
55
56##
57## (5) link settings
58##
59TEXTADDR?=	${DEFTEXTADDR}
60LINKFLAGS_NORMAL=	-X
61
62##
63## (6) port specific target dependencies
64##
65
66# depend on CPU configuration
67locore.o machdep.o: Makefile
68
69##
70## (7) misc settings
71##
72
73##
74## (8) config(8) generated machinery
75##
76%INCLUDES
77
78%OBJS
79
80%CFILES
81
82%SFILES
83
84%LOAD
85
86%RULES
87
88##
89## (9) port independent kernel machinery
90##
91.include "$S/conf/Makefile.kern.inc"
92
93##
94## (10) Appending make options.
95##
96%MAKEOPTIONSAPPEND
97