7 NEWVERSWHAT?= "bootstrap loader" sparc64
12 # Architecture-specific loader code
13 SRCS= locore.S main.c metadata.c vers.c
15 LOADER_DISK_SUPPORT?= yes
16 LOADER_UFS_SUPPORT?= yes
17 LOADER_CD9660_SUPPORT?= yes
18 LOADER_ZFS_SUPPORT?= no
19 LOADER_NET_SUPPORT?= yes
20 LOADER_NFS_SUPPORT?= yes
21 LOADER_TFTP_SUPPORT?= yes
22 LOADER_GZIP_SUPPORT?= yes
23 LOADER_BZIP2_SUPPORT?= no
26 .if ${LOADER_DEBUG} == "yes"
27 CFLAGS+= -DLOADER_DEBUG
29 .if ${LOADER_DISK_SUPPORT} == "yes"
30 CFLAGS+= -DLOADER_DISK_SUPPORT
32 .if ${LOADER_UFS_SUPPORT} == "yes"
33 CFLAGS+= -DLOADER_UFS_SUPPORT
35 .if ${LOADER_CD9660_SUPPORT} == "yes"
36 CFLAGS+= -DLOADER_CD9660_SUPPORT
38 .if ${LOADER_ZFS_SUPPORT} == "yes"
39 CFLAGS+= -DLOADER_ZFS_SUPPORT
40 CFLAGS+= -I${.CURDIR}/../../zfs
41 CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
42 LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
44 .if ${LOADER_GZIP_SUPPORT} == "yes"
45 CFLAGS+= -DLOADER_GZIP_SUPPORT
47 .if ${LOADER_BZIP2_SUPPORT} == "yes"
48 CFLAGS+= -DLOADER_BZIP2_SUPPORT
50 .if ${LOADER_NET_SUPPORT} == "yes"
51 CFLAGS+= -DLOADER_NET_SUPPORT
53 .if ${LOADER_NFS_SUPPORT} == "yes"
54 CFLAGS+= -DLOADER_NFS_SUPPORT
56 .if ${LOADER_TFTP_SUPPORT} == "yes"
57 CFLAGS+= -DLOADER_TFTP_SUPPORT
60 .if ${MK_FORTH} != "no"
63 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
64 CFLAGS+= -I${.CURDIR}/../../ficl/sparc64
65 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
68 # Always add MI sources
69 .PATH: ${.CURDIR}/../../common
70 .include "${.CURDIR}/../../common/Makefile.inc"
71 CFLAGS+= -I${.CURDIR}/../../common
73 # Avoid the open-close-dance for every file access as some firmwares perform
74 # an auto-negotiation on every open of the network interface and thus causes
75 # netbooting to take horribly long.
76 CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE
78 CLEANFILES+= vers.c loader.help
82 # Open Firmware standalone support library
83 LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
84 CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
86 # where to get libstand from
87 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
89 DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
90 LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
92 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
93 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
96 loader.help: help.common help.sparc64
98 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
100 .PATH: ${.CURDIR}/../../forth
101 FILES= loader.help loader.4th support.4th loader.conf
102 FILES+= screen.4th frames.4th
103 FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
104 FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
105 FILESDIR_loader.conf= /boot/defaults
107 .if !exists(${DESTDIR}/boot/loader.rc)
111 .if !exists(${DESTDIR}/boot/menu.rc)
115 .include <bsd.prog.mk>