xref: /netbsd/sys/arch/vax/boot/xxboot/Makefile (revision 04c8c320)
1#	$NetBSD: Makefile,v 1.22 2020/09/15 05:08:07 mrg Exp $
2
3S=	${.CURDIR}/../../../..
4
5.include <bsd.own.mk>
6
7PROG=	xxboot
8LINKS=	${BINDIR}/xxboot ${BINDIR}/raboot
9LINKS+=	${BINDIR}/xxboot ${BINDIR}/rdboot
10LINKS+=	${BINDIR}/xxboot ${BINDIR}/sdboot
11LINKS+=	${BINDIR}/xxboot ${BINDIR}/hpboot
12
13SRCS=	start.S bootxx.c romread.S str.S
14
15STRIPFLAG=
16CPPFLAGS+=-D_STANDALONE -DLIBSA_NO_FD_CHECKING -DLIBSA_NO_RAW_ACCESS \
17	-DLIBSA_NO_TWIDDLE -DLIBSA_SINGLE_DEVICE=rom \
18	-DLIBSA_NO_COMPAT_UFS \
19	-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_CLOSE \
20	-DLIBSA_NO_FS_WRITE -DLIBSA_NO_FS_SEEK \
21	-DNEED_UFS -DNEED_CD9660
22# Use small daddr_t to avoid code bloat
23CPPFLAGS+=-D__daddr_t=int32_t
24BINDIR=	/usr/mdec
25
26CFLAGS=	-Os
27LIBC=
28
29SA_AS=	library
30.include "${S}/lib/libsa/Makefile.inc"
31LIBSA=	${SALIB}
32
33KERN_AS=library
34.include "${S}/lib/libkern/Makefile.inc"
35LIBKERN=${KERNLIB}
36
37CLEANFILES+= ${PROG}.out
38
39${PROG}: ${OBJS} ${LIBSA} ${LIBKERN}
40	${LD} -N -Ttext 100000 -o ${PROG}.out ${OBJS} ${LIBSA} ${LIBKERN}
41	${SIZE} ${PROG}.out
42	${OBJCOPY} -O binary ${PROG}.out ${PROG}
43
44COPTS.bootxx.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :}
45
46.include <bsd.prog.mk>
47