xref: /netbsd/sys/arch/sh3/conf/Makefile.sh3 (revision bf9ec67e)
1#	$NetBSD: Makefile.sh3,v 1.18 2002/03/17 17:55:24 uch 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=	${SH3}/sh3/genassym.cf
30.-include "${THISSH3}/conf/Makefile.${MACHINE}.inc"
31
32##
33## (2) compile settings
34##
35CPPFLAGS+=	-D${MACHINE}
36CWARNFLAGS+=	-Wno-parentheses
37AFLAGS+=	-x assembler-with-cpp -traditional-cpp
38# pkgsrc/cross/sh* dies with -O2, use -O1 for now
39COPTS?=		-O1
40
41##
42## (3) libkern and compat
43##
44
45##
46## (4) local objects, compile rules, and dependencies
47##
48MD_OBJS=	locore.o
49MD_CFILES=
50MD_SFILES=	${THISSH3}/${MACHINE}/locore.S
51
52locore.o: ${THISSH3}/${MACHINE}/locore.S assym.h
53	${NORMAL_S}
54
55# XXX compile ffs_inode.c always with -O0 to avoid egcs-1.1.2 bug.
56#ffs_inode.o: $S/ufs/ffs/ffs_inode.c
57#	${CC} ${CFLAGS} -O0 ${CPPFLAGS} ${PROF} -c $<
58
59##
60## (5) link settings
61##
62# LINKFORMAT possibly set by individual sh3 port
63# LDSCRIPTBASE comes from the kernel's config
64LINKFORMAT?=	-T ${THISSH3}/conf/${LDSCRIPTBASE}
65
66##
67## (6) port specific target dependencies
68##
69
70# depend on CPU configuration
71locore.o machdep.o: Makefile
72
73##
74## (7) misc settings
75##
76
77##
78## (8) config(8) generated machinery
79##
80%INCLUDES
81
82%OBJS
83
84%CFILES
85
86%SFILES
87
88%LOAD
89
90%RULES
91
92##
93## (9) port independent kernel machinery
94##
95.include "$S/conf/Makefile.kern.inc"
96