Makefile.sparc64 revision 1.44
1# 	$NetBSD: Makefile.sparc64,v 1.44 2001/12/09 05:00:51 atatat 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/sparc64/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/sparc64/conf/Makefile.sparc64
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
20# Default to 32-bit.  Set the MACHINE_ARCH accordingly, using either
21# the 32-bit or 64-bit toolchain.
22LP64?=	no
23.if ${LP64} == "yes"
24MACHINE_ARCH=sparc64
25.else
26MACHINE_ARCH=sparc
27.endif
28
29USETOOLS?=	no
30NEED_OWN_INSTALL_TARGET?=no
31.include <bsd.own.mk>
32
33##
34## (1) port identification
35##
36SPARC64=	$S/arch/sparc64
37GENASSYM=	${SPARC64}/sparc64/genassym.cf
38
39##
40## (2) compile settings
41##
42CPPFLAGS+=	-Dsparc64
43.if ${LP64} == "yes"
44CPPFLAGS+=	-D_LP64
45.endif
46CFLAGS+=	-Wa,-Av9a -mno-fpu
47.if defined(PROF)
48# We need to run the compiler in medlow memory model.
49CFLAGS+=	-mcmodel=medlow
50.endif
51AFLAGS+=	-x assembler-with-cpp -traditional-cpp -Wa,-Av9a
52
53NOOPT_C=	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -O0 -c $<
54
55##
56## (3) libkern and compat
57##
58# KERN_AS=	obj	# bcopy, bzero, memcpy, memset, etc. are in locore.s
59
60##
61## (4) local objects, compile rules, and dependencies
62##
63MD_OBJS=	locore.o
64MD_CFILES=
65MD_SFILES=	${SPARC64}/sparc64/locore.s
66
67locore.o: ${SPARC64}/sparc64/locore.s assym.h
68	${NORMAL_S}
69
70##
71## (5) link settings
72##
73TEXTADDR?=	01000000
74DATAADDR?=	01800000
75LINKFORMAT=	-n -T ${SPARC64}/conf/${KERN_LDSCRIPT}
76.if ${LP64} == "yes"
77KERN_LDSCRIPT?= kern.ldscript
78.else
79KERN_LDSCRIPT?= kern32.ldscript
80.endif
81
82##
83## (6) port specific target dependencies
84##
85
86# depend on CPU configuration
87bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile
88ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o locore.o: Makefile
89machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile
90
91##
92## (7) misc settings
93##
94
95##
96## (8) config(8) generated machinery
97##
98%INCLUDES
99
100%OBJS
101
102%CFILES
103
104%SFILES
105
106%LOAD
107
108%RULES
109
110##
111## (9) port independent kernel machinery
112##
113.include "$S/conf/Makefile.kern.inc"
114