blob: 09a67c136d006c0f0daae6bc1781875690e634be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# $NetBSD: Makefile.buildboot,v 1.32 2016/10/01 13:57:44 christos Exp $
#
# This file is for the sparc `boot' and `bootxx' only; it does not
# currently play well on a 64-bit system.
NOSSP= # defined
NOPIE= # defined
NOMAN= # defined
S= ${.CURDIR}/../../../..
.PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c isfloppy.c
SRCS= ${COMMONSOURCE} ${PROGSOURCE}
BINMODE= 444
.include <bsd.own.mk>
#
# 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
RELOCS= $(RELOC_DEFAULT)
#RELOCS+= 200000 400000 700000 # additional link addresses
# `bootxx' is linked at a different address to circumvent i-cache
# flushing issues on Hypersparcs
RELOC_BOOTXX= 300000
CPPFLAGS+= -D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
CPPFLAGS+= -I${.CURDIR}/../../../../../common/include
CFLAGS= ${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables
AFLAGS+= ${${ACTIVE_CC} == "clang":? -Oz :}
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
### 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
SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
.include <bsd.klinks.mk>
cleandir distclean: .WAIT cleanlibdir
cleanlibdir:
-rm -rf lib
|