xref: /netbsd-src/sys/arch/sparc/conf/Makefile.sparc (revision 37b34d511dea595d3ba03a661cf3b775038ea5f8)
1# 	$NetBSD: Makefile.sparc,v 1.81 2002/07/01 16:37:08 christos 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/sparc/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/sparc/conf/Makefile.sparc
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
20MACHINE_ARCH=	sparc
21USETOOLS?=	no
22NEED_OWN_INSTALL_TARGET?=no
23.include <bsd.own.mk>
24
25##
26## (1) port identification
27##
28SPARC=		$S/arch/sparc
29GENASSYM=	${SPARC}/sparc/genassym.cf
30
31##
32## (2) compile settings
33##
34# work around GCC (egcs-2.91.66) bug which is liable
35# to use FPU registers as temporaries:
36CFLAGS+=	-mno-fpu
37.if defined(HAVE_GCC3)
38AFLAGS+=	-x assembler-with-cpp
39.else
40AFLAGS+=	-x assembler-with-cpp -traditional-cpp
41.endif
42
43##
44## (3) libkern and compat
45##
46KERN_AS=	obj
47
48##
49## (4) local objects, compile rules, and dependencies
50##
51MD_OBJS=	locore.o
52MD_CFILES=
53MD_SFILES=	${SPARC}/sparc/locore.s
54
55locore.o: ${SPARC}/sparc/locore.s assym.h
56	${NORMAL_S}
57
58amd7930intr.o: assym.h
59bsd_fdintr.o: assym.h
60
61##
62## (5) link settings
63##
64TEXTADDR?=	F0004000
65EXTRA_LINKFLAGS=	-X
66.if ${OBJECT_FMT} == "ELF"
67KERN_LDSCRIPT?= kern.ldscript
68LINKFORMAT=	-n -T ${SPARC}/conf/${KERN_LDSCRIPT}
69.else
70LINKFORMAT=	-N -p
71.endif
72
73##
74## (6) port specific target dependencies
75##
76
77##
78## (7) misc settings
79##
80
81##
82## (8) config(8) generated machinery
83##
84%INCLUDES
85
86%OBJS
87
88%CFILES
89
90%SFILES
91
92%LOAD
93
94%RULES
95
96##
97## (9) port independent kernel machinery
98##
99.include "$S/conf/Makefile.kern.inc"
100