blob: a25956891e05c5be29c05880e74e18f621aa0696 (
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
82
83
84
85
86
87
88
89
90
91
92
|
# $NetBSD: Makefile,v 1.2 2001/03/04 14:50:05 mrg Exp $
CURDIR= ${.CURDIR}
S= ${CURDIR}/../../../..
#
# Override normal settings
#
WARNS= 0
PROG?= ofwboot
SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c
.PATH: ${S}/arch/sparc64/sparc64
CWARNFLAGS+= -Wno-main
CFLAGS+= ${COPTS} ${CEXTRAFLAGS}
CPPFLAGS+= -D_STANDALONE -DSUN4U
#CPPFLAGS+= -DNETIF_DEBUG
MKMAN= no
STRIPFLAG=
BINMODE= 444
OBJCOPY?= objcopy
NEWVERSWHAT= "OpenFirmware Boot"
#
# Elf64 defaults to 1MB
#
# We may get address conflicts with other bootloaders, say
# Sun's ufsboot, so we'll pick a reasonably empty address.
#
RELOC= 800000
ENTRY= _start
CLEANFILES+= vers.c sparc machine
CPPFLAGS+= -I${CURDIR}/../../.. -I${CURDIR}/../../../.. -I${CURDIR} -I.
CPPFLAGS+= -DRELOC=0x${RELOC}
#
# XXXXX FIXME
#
CPPFLAGS+= -DSPARC_BOOT_AOUT
CPPFLAGS+= -DSPARC_BOOT_ELF
CPPFLAGS+= -DSPARC_BOOT_UFS
CPPFLAGS+= -DSPARC_BOOT_NFS
#CPPFLAGS+= -DSPARC_BOOT_HSFS
.NOPATH: machine sparc64
${SRCS}: machine sparc64
machine:
rm -f machine
ln -s sparc64 machine
sparc64:
rm -f sparc64
ln -s ${.CURDIR}/../../../sparc64/include sparc64
vers.c: version
sh ${S}/conf/newvers.sh ${CURDIR}/version "sparc64" ${NEWVERSWHAT}
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${LD} -N -p -Ttext ${RELOC} -e ${ENTRY} >lderr -o ${PROG} \
${OBJS} -L${LIBSADIR} ${LIBSA} -L${LIBKERNDIR} ${LIBKERN} \
-L${LIBZDIR} ${LIBZ}
.include <bsd.prog.mk>
.if ${MACHINE_ARCH} == "sparc64"
AFLAGS+= -Wa,-Av9a
CEXTRAFLAGS?= -D_LP64
.else
AFLAGS+= -Wa,-Av8plusa
.endif
.if CROSS
AFLAGS+= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D__ELF__
CEXTRAFLAGS?= -D_LP64
.else
AFLAGS+= -x assembler-with-cpp -traditional-cpp -D_LOCORE -D__ELF__ ${CEXTRAFLAGS}
.endif
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
srt0.o: srt0.s
${NORMAL_S}
# Explicit dependency for this.
boot.o: boot.c elfXX_exec.c
|