1# $NetBSD: Makefile.buildboot,v 1.28 2010/08/25 20:16:48 christos Exp $ 2# 3# This file is for the sparc `boot' and `bootxx' only; it does not 4# currently play well on a 64-bit system. 5 6S= ${.CURDIR}/../../../.. 7 8.PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc 9 10COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c isfloppy.c 11 12SRCS= ${COMMONSOURCE} ${PROGSOURCE} 13NOMAN= # defined 14BINMODE= 444 15 16# 17# The relocation address for `boot' must leave enough free memory below 18# it to load a kernel at address 0x4000. On the other hand, on some 19# machines, the PROM uses memory in the upper portion of the first 4MB 20# segment, depending on the actual memory bank configuration probably. 21# Our boot program must stear clear of that as well. 22# 23# Relocating `boot' at 0x388000 seems to provide a working compromise 24# on the machines tested so far. 25# 26RELOC_DEFAULT?= 388000 27RELOCS= $(RELOC_DEFAULT) 28#RELOCS+= 200000 400000 700000 # additional link addresses 29 30# `bootxx' is linked at a different address to circumvent i-cache 31# flushing issues on Hypersparcs 32RELOC_BOOTXX= 300000 33 34CPPFLAGS+= -D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE 35 36CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 37CPPFLAGS+= -I${.CURDIR}/../../../../../common/include 38CFLAGS= -Os 39CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding 40 41### find out what to use for libkern 42KERN_AS= library 43.include "${S}/lib/libkern/Makefile.inc" 44LIBKERN= ${KERNLIB} 45 46.ifdef INCLUDE_LIBZ 47### find out what to use for libz 48Z_AS= library 49.include "${S}/lib/libz/Makefile.inc" 50LIBZ= ${ZLIB} 51.endif 52 53### find out what to use for libsa 54SA_AS= library 55SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes" 56.include "${S}/lib/libsa/Makefile.inc" 57LIBSA= ${SALIB} 58 59.include <bsd.klinks.mk> 60 61cleandir distclean: .WAIT cleanlibdir 62 63cleanlibdir: 64 -rm -rf lib 65