blob: b1d30c3f4e80277e97b4877798f7539ac47d2374 (
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
|
# $OpenBSD: Makefile,v 1.12 2013/07/05 21:13:07 miod Exp $
# $NetBSD: Makefile,v 1.12 2002/02/24 01:04:25 matt Exp $
S= ${.CURDIR}/../../../../
PROG= xxboot
LINKS= ${BINDIR}/xxboot ${BINDIR}/raboot
LINKS+= ${BINDIR}/xxboot ${BINDIR}/hdboot
LINKS+= ${BINDIR}/xxboot ${BINDIR}/sdboot
WARNS?= 1
SRCS= start.S bootxx.c romread.S str.S urem.s udiv.s
INSTALL_STRIP=
CPPFLAGS+=-D_STANDALONE -DLIBSA_NO_FD_CHECKING -DLIBSA_NO_RAW_ACCESS \
-DLIBSA_NO_TWIDDLE -DLIBSA_SINGLE_DEVICE=rom \
-DLIBSA_NO_COMPAT_UFS \
-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_CLOSE \
-DLIBSA_NO_FS_WRITE -DLIBSA_NO_FS_SEEK \
-DNEED_UFS
AFLAGS+=-D_LOCORE
BINDIR= /usr/mdec
NOMAN= # defined
NOPIE=
CFLAGS= -Os
SAREL=
SA_AS= library
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
.if ${MACHINE} == "vax"
.PHONY: machine-links
beforedepend: machine-links
machine-links:
@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
@[ -h ${MACHINE_ARCH} ] || ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
.NOPATH: machine ${MACHINE_ARCH}
CLEANFILES+= machine ${MACHINE_ARCH} ${PROG}.out assym.h
.endif
start.o: assym.h
assym.h: $S/kern/genassym.sh Makefile ${.CURDIR}/genassym.cf
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
< ${.CURDIR}/genassym.cf | sort -u > assym.h
${PROG}: ${OBJS} ${LIBSA}
${LD} -N -Ttext 100000 -o ${PROG}.out ${OBJS} ${LIBSA}
/usr/bin/strip ${PROG}.out
/usr/bin/size ${PROG}.out
/usr/bin/objcopy -O binary ${PROG}.out ${PROG}
clean::
rm -f a.out [Ee]rrs mklog core *.core ${PROG} ${OBJS} ${LOBJS} \
${CLEANFILES}
.include <bsd.prog.mk>
|