Makefile.buildboot revision 1.30
11.30Sjoerg#	$NetBSD: Makefile.buildboot,v 1.30 2016/02/27 19:25:08 joerg 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.28SchristosCOMMONSOURCE=	srt0.S promdev.c dvma.c promlib.c isfloppy.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.30SjoergCFLAGS=		${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables
391.30SjoergAFLAGS+=	${${ACTIVE_CC} == "clang":? -Oz :}
401.21SmrgCFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
411.1Smrg
421.1Smrg### find out what to use for libkern
431.1SmrgKERN_AS=	library
441.1Smrg.include "${S}/lib/libkern/Makefile.inc"
451.1SmrgLIBKERN=	${KERNLIB}
461.1Smrg
471.1Smrg.ifdef INCLUDE_LIBZ
481.1Smrg### find out what to use for libz
491.1SmrgZ_AS=		library
501.1Smrg.include "${S}/lib/libz/Makefile.inc"
511.1SmrgLIBZ=		${ZLIB}
521.1Smrg.endif
531.1Smrg
541.1Smrg### find out what to use for libsa
551.1SmrgSA_AS=		library
561.6SchristosSAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
571.1Smrg.include "${S}/lib/libsa/Makefile.inc"
581.1SmrgLIBSA=		${SALIB}
591.5Spk
601.25Stsutsui.include <bsd.klinks.mk>
611.20Snakayama
621.27Sdhollandcleandir distclean: .WAIT cleanlibdir
631.20Snakayama
641.20Snakayamacleanlibdir:
651.22Sjmc	-rm -rf lib
66