1 # $NetBSD: Makefile,v 1.22 2020/09/15 05:08:07 mrg Exp $ 2 3 S= ${.CURDIR}/../../../.. 4 5 .include <bsd.own.mk> 6 7 PROG= xxboot 8 LINKS= ${BINDIR}/xxboot ${BINDIR}/raboot 9 LINKS+= ${BINDIR}/xxboot ${BINDIR}/rdboot 10 LINKS+= ${BINDIR}/xxboot ${BINDIR}/sdboot 11 LINKS+= ${BINDIR}/xxboot ${BINDIR}/hpboot 12 13 SRCS= start.S bootxx.c romread.S str.S 14 15 STRIPFLAG= 16 CPPFLAGS+=-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 23 CPPFLAGS+=-D__daddr_t=int32_t 24 BINDIR= /usr/mdec 25 26 CFLAGS= -Os 27 LIBC= 28 29 SA_AS= library 30 .include "${S}/lib/libsa/Makefile.inc" 31 LIBSA= ${SALIB} 32 33 KERN_AS=library 34 .include "${S}/lib/libkern/Makefile.inc" 35 LIBKERN=${KERNLIB} 36 37 CLEANFILES+= ${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 44 COPTS.bootxx.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :} 45 46 .include <bsd.prog.mk> 47