Makefile.buildboot revision 1.27
11.27Sdholland#	$NetBSD: Makefile.buildboot,v 1.27 2010/05/27 06:58:15 dholland Exp $
21.18Smrg#
31.18Smrg# This file is for the sparc `boot' and `bootxx' only; it does not
41.18Smrg# currently play well on a 64-bit system.
51.1Smrg
61.1SmrgS=	${.CURDIR}/../../../..
71.1Smrg
81.4Spk.PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
91.1Smrg
101.4SpkCOMMONSOURCE=	srt0.S promdev.c dvma.c promlib.c
111.1Smrg
121.1SmrgSRCS=		${COMMONSOURCE} ${PROGSOURCE}
131.17StvNOMAN=		# defined
141.1SmrgBINMODE=	444
151.1Smrg
161.15Spk#
171.15Spk# The relocation address for `boot' must leave enough free memory below
181.15Spk# it to load a kernel at address 0x4000. On the other hand, on some
191.15Spk# machines, the PROM uses memory in the upper portion of the first 4MB
201.15Spk# segment, depending on the actual memory bank configuration probably.
211.15Spk# Our boot program must stear clear of that as well.
221.15Spk#
231.15Spk# Relocating `boot' at 0x388000 seems to provide a working compromise
241.15Spk# on the machines tested so far.
251.15Spk#
261.15SpkRELOC_DEFAULT?=	388000
271.14SpkRELOCS=		$(RELOC_DEFAULT)
281.14Spk#RELOCS+=	200000 400000 700000		# additional link addresses
291.14Spk
301.11Spk# `bootxx' is linked at a different address to circumvent i-cache
311.11Spk# flushing issues on Hypersparcs
321.14SpkRELOC_BOOTXX=	300000
331.1Smrg
341.19SpkCPPFLAGS+=	-D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
351.1Smrg
361.5SpkCPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
371.26StsutsuiCPPFLAGS+=	-I${.CURDIR}/../../../../../common/include
381.24StsutsuiCFLAGS=		-Os
391.21SmrgCFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
401.1Smrg
411.1Smrg### find out what to use for libkern
421.1SmrgKERN_AS=	library
431.1Smrg.include "${S}/lib/libkern/Makefile.inc"
441.1SmrgLIBKERN=	${KERNLIB}
451.1Smrg
461.1Smrg.ifdef INCLUDE_LIBZ
471.1Smrg### find out what to use for libz
481.1SmrgZ_AS=		library
491.1Smrg.include "${S}/lib/libz/Makefile.inc"
501.1SmrgLIBZ=		${ZLIB}
511.1Smrg.endif
521.1Smrg
531.1Smrg### find out what to use for libsa
541.1SmrgSA_AS=		library
551.6SchristosSAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
561.1Smrg.include "${S}/lib/libsa/Makefile.inc"
571.1SmrgLIBSA=		${SALIB}
581.5Spk
591.25Stsutsui.include <bsd.klinks.mk>
601.20Snakayama
611.27Sdhollandcleandir distclean: .WAIT cleanlibdir
621.20Snakayama
631.20Snakayamacleanlibdir:
641.22Sjmc	-rm -rf lib
65