summaryrefslogtreecommitdiff
path: root/sys/arch/sgimips/stand/Makefile.booters
blob: f0596892732dedfb7c6f0fa59a88e96db8f50003 (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
71
72
73
74
75
76
77
78
79
80
81
# $NetBSD: Makefile.booters,v 1.25 2019/01/12 16:44:47 tsutsui Exp $

# PROG set by parent.
NOMAN=		# defined
NOPIE=		# defined

.include <bsd.init.mk>
.include <bsd.sys.mk>		# for HOST_SH

# $S must correspond to the top of the 'sys' tree
S=	${.CURDIR}/../../../..

BINMODE?=	444

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTI=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

realall: ${PROG}

.PATH:		${.CURDIR}/../common
.if !defined(PRE_ARCS)
.PATH.S:	${S}/dev/arcbios
.endif
AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
# compiler flags for smallest code size
CFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
.if ${MACHINE_ARCH} == "mips64eb"
AFLAGS+=	-mips3 -mabi=32
CFLAGS+=	-mips3 -mabi=32
.endif
CWARNFLAGS+=	-Wall -Werror
CWARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CWARNFLAGS+=	-Wno-pointer-sign
LDBUG=		-T $S/arch/mips/conf/stand.ldscript
NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

CPPFLAGS+=	-Dsgimips

.if !defined(PRE_ARCS)
.include "${S}/dev/arcbios/Makefile.inc"
.endif

# We load the kernel at 420K in from the start of RAM to give the boot
# loader plenty of breathing room.  Load the boot loader starting at
# the second page of RAM.
# A warm thank-you to SGI for making load addresses different :)
LOAD_ADDRESS?=		0x88002000
LOAD_ADDRESS_IP12?=	0x80368000
LOAD_ADDRESS_IP32?=	0x80002000

.include "${S}/conf/newvers_stand.mk"

### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}

### find out what to use for libsa
SA_AS=		library
SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
# for now:
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}


LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}

.include <bsd.klinks.mk>
.include <bsd.prog.mk>