7 NEWVERSWHAT?= "bootstrap loader" sparc64
10 # Architecture-specific loader code
11 SRCS= locore.S main.c metadata.c vers.c
13 LOADER_DISK_SUPPORT?= yes
14 LOADER_UFS_SUPPORT?= yes
15 LOADER_CD9660_SUPPORT?= yes
16 LOADER_ZFS_SUPPORT?= no
17 LOADER_NET_SUPPORT?= yes
18 LOADER_NFS_SUPPORT?= yes
19 LOADER_TFTP_SUPPORT?= yes
20 LOADER_GZIP_SUPPORT?= yes
21 LOADER_BZIP2_SUPPORT?= no
24 .if ${LOADER_DEBUG} == "yes"
25 CFLAGS+= -DLOADER_DEBUG
27 .if ${LOADER_DISK_SUPPORT} == "yes"
28 CFLAGS+= -DLOADER_DISK_SUPPORT
30 .if ${LOADER_UFS_SUPPORT} == "yes"
31 CFLAGS+= -DLOADER_UFS_SUPPORT
33 .if ${LOADER_CD9660_SUPPORT} == "yes"
34 CFLAGS+= -DLOADER_CD9660_SUPPORT
36 .if ${LOADER_ZFS_SUPPORT} == "yes"
37 CFLAGS+= -DLOADER_ZFS_SUPPORT
38 CFLAGS+= -I${.CURDIR}/../../zfs
39 CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
40 LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
42 .if ${LOADER_GZIP_SUPPORT} == "yes"
43 CFLAGS+= -DLOADER_GZIP_SUPPORT
45 .if ${LOADER_BZIP2_SUPPORT} == "yes"
46 CFLAGS+= -DLOADER_BZIP2_SUPPORT
48 .if ${LOADER_NET_SUPPORT} == "yes"
49 CFLAGS+= -DLOADER_NET_SUPPORT
51 .if ${LOADER_NFS_SUPPORT} == "yes"
52 CFLAGS+= -DLOADER_NFS_SUPPORT
54 .if ${LOADER_TFTP_SUPPORT} == "yes"
55 CFLAGS+= -DLOADER_TFTP_SUPPORT
58 .if ${MK_FORTH} != "no"
61 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
62 CFLAGS+= -I${.CURDIR}/../../ficl/sparc64
63 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
66 # Always add MI sources
67 .PATH: ${.CURDIR}/../../common
68 .include "${.CURDIR}/../../common/Makefile.inc"
69 CFLAGS+= -I${.CURDIR}/../../common
71 # Avoid the open-close-dance for every file access as some firmwares perform
72 # an auto-negotiation on every open of the network interface and thus causes
73 # netbooting to take horribly long.
74 CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE
76 CLEANFILES+= vers.c loader.help
80 # Open Firmware standalone support library
81 LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
82 CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
84 # where to get libstand from
85 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
87 DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
88 LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
90 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
91 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
94 loader.help: help.common help.sparc64
96 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
98 .PATH: ${.CURDIR}/../../forth
99 FILES= loader.help loader.4th support.4th loader.conf
100 FILES+= screen.4th frames.4th
101 FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
102 FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
103 FILESDIR_loader.conf= /boot/defaults
105 .if !exists(${DESTDIR}/boot/loader.rc)
109 .if !exists(${DESTDIR}/boot/menu.rc)
113 .include <bsd.prog.mk>