1 # $NetBSD: Makefile.buildboot,v 1.25 2009/03/29 07:19:40 tsutsui Exp $
3 # This file is for the sparc `boot' and `bootxx' only; it does not
4 # currently play well on a 64-bit system.
6 S= ${.CURDIR}/../../../..
8 .PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
10 COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c
12 SRCS= ${COMMONSOURCE} ${PROGSOURCE}
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.
23 # Relocating `boot' at 0x388000 seems to provide a working compromise
24 # on the machines tested so far.
26 RELOC_DEFAULT?= 388000
27 RELOCS= $(RELOC_DEFAULT)
28 #RELOCS+= 200000 400000 700000 # additional link addresses
30 # `bootxx' is linked at a different address to circumvent i-cache
31 # flushing issues on Hypersparcs
34 CPPFLAGS+= -D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
36 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
37 CPPFLAGS+= -I${.CURDIR}/../../../../../common/include
39 CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
41 ### find out what to use for libkern
43 .include "${S}/lib/libkern/Makefile.inc"
47 ### find out what to use for libz
49 .include "${S}/lib/libz/Makefile.inc"
53 ### find out what to use for libsa
55 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
56 .include "${S}/lib/libsa/Makefile.inc"
59 .include <bsd.klinks.mk>
61 cleandir distclean: cleanlibdir