2003-07-30 19:58:36 +04:00
|
|
|
# $NetBSD: Makefile.buildboot,v 1.21 2003/07/30 15:58:38 mrg Exp $
|
2002-07-20 15:43:43 +04:00
|
|
|
#
|
|
|
|
# This file is for the sparc `boot' and `bootxx' only; it does not
|
|
|
|
# currently play well on a 64-bit system.
|
1997-06-01 07:39:03 +04:00
|
|
|
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
|
1999-02-15 21:52:12 +03:00
|
|
|
.PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
|
1997-06-01 07:39:03 +04:00
|
|
|
|
1999-02-15 21:52:12 +03:00
|
|
|
COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c
|
1997-06-01 07:39:03 +04:00
|
|
|
|
|
|
|
SRCS= ${COMMONSOURCE} ${PROGSOURCE}
|
2001-12-12 04:48:43 +03:00
|
|
|
NOMAN= # defined
|
1997-06-01 07:39:03 +04:00
|
|
|
BINMODE= 444
|
|
|
|
|
2000-11-01 02:21:47 +03:00
|
|
|
#
|
|
|
|
# The relocation address for `boot' must leave enough free memory below
|
|
|
|
# it to load a kernel at address 0x4000. On the other hand, on some
|
|
|
|
# machines, the PROM uses memory in the upper portion of the first 4MB
|
|
|
|
# segment, depending on the actual memory bank configuration probably.
|
|
|
|
# Our boot program must stear clear of that as well.
|
|
|
|
#
|
|
|
|
# Relocating `boot' at 0x388000 seems to provide a working compromise
|
|
|
|
# on the machines tested so far.
|
|
|
|
#
|
|
|
|
RELOC_DEFAULT?= 388000
|
2000-10-20 15:21:08 +04:00
|
|
|
RELOCS= $(RELOC_DEFAULT)
|
|
|
|
#RELOCS+= 200000 400000 700000 # additional link addresses
|
|
|
|
|
2000-02-21 18:07:32 +03:00
|
|
|
# `bootxx' is linked at a different address to circumvent i-cache
|
|
|
|
# flushing issues on Hypersparcs
|
2000-10-20 15:21:08 +04:00
|
|
|
RELOC_BOOTXX= 300000
|
1997-06-01 07:39:03 +04:00
|
|
|
|
2003-03-01 16:01:55 +03:00
|
|
|
CPPFLAGS+= -D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
|
1997-06-01 07:39:03 +04:00
|
|
|
|
1999-02-15 22:31:34 +03:00
|
|
|
CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
|
1997-06-01 07:39:03 +04:00
|
|
|
CFLAGS= -O2
|
2003-07-30 19:58:36 +04:00
|
|
|
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
|
1997-06-01 07:39:03 +04:00
|
|
|
|
|
|
|
### find out what to use for libkern
|
|
|
|
KERN_AS= library
|
|
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
|
|
|
|
.ifdef INCLUDE_LIBZ
|
|
|
|
### find out what to use for libz
|
|
|
|
Z_AS= library
|
|
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
|
|
LIBZ= ${ZLIB}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
### find out what to use for libsa
|
|
|
|
SA_AS= library
|
1999-04-28 19:22:25 +04:00
|
|
|
SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
|
1997-06-01 07:39:03 +04:00
|
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SALIB}
|
1999-02-15 22:31:34 +03:00
|
|
|
|
2001-11-22 03:14:20 +03:00
|
|
|
.if !make(obj) && !make(clean) && !make(cleandir)
|
1999-02-15 22:31:34 +03:00
|
|
|
.BEGIN:
|
2002-07-20 15:43:43 +04:00
|
|
|
@([ -h machine ] || ln -s ${S}/arch/sparc/include machine)
|
|
|
|
@([ -h sparc ] || ln -s ${S}/arch/sparc/include sparc)
|
|
|
|
.NOPATH: machine sparc
|
1999-11-25 16:27:30 +03:00
|
|
|
.endif
|
2002-07-20 15:43:43 +04:00
|
|
|
CLEANFILES+= machine sparc
|
2003-05-17 06:30:14 +04:00
|
|
|
|
|
|
|
cleandir distclean: cleanlibdir
|
|
|
|
|
|
|
|
cleanlibdir:
|
|
|
|
rm -rf lib
|