2001-10-15 06:36:35 -04:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
2014-05-06 00:22:01 -04:00
|
|
|
.include <src.opts.mk>
|
2009-02-21 10:04:31 -05:00
|
|
|
MK_SSP= no
|
2015-06-19 10:20:21 -04:00
|
|
|
MAN=
|
2006-03-17 13:54:44 -05:00
|
|
|
|
2012-05-01 13:16:01 -04:00
|
|
|
PROG?= loader
|
|
|
|
|
NEWVERSWHAT?= "bootstrap loader" sparc64
|
2016-12-19 09:40:59 -05:00
|
|
|
VERSION_FILE= ${.CURDIR}/../loader/version
|
2002-04-02 12:08:37 -05:00
|
|
|
INSTALLFLAGS= -b
|
2001-10-15 06:36:35 -04:00
|
|
|
|
2002-05-28 19:09:59 -04:00
|
|
|
# Architecture-specific loader code
|
2002-07-07 14:23:10 -04:00
|
|
|
SRCS= locore.S main.c metadata.c vers.c
|
2002-02-22 23:35:28 -05:00
|
|
|
|
2002-04-02 12:08:37 -05:00
|
|
|
LOADER_DISK_SUPPORT?= yes
|
|
|
|
|
LOADER_UFS_SUPPORT?= yes
|
2002-06-21 18:34:51 -04:00
|
|
|
LOADER_CD9660_SUPPORT?= yes
|
2012-05-01 13:16:01 -04:00
|
|
|
LOADER_ZFS_SUPPORT?= no
|
2002-07-07 19:08:22 -04:00
|
|
|
LOADER_NET_SUPPORT?= yes
|
|
|
|
|
LOADER_NFS_SUPPORT?= yes
|
|
|
|
|
LOADER_TFTP_SUPPORT?= yes
|
2002-10-13 14:52:46 -04:00
|
|
|
LOADER_GZIP_SUPPORT?= yes
|
|
|
|
|
LOADER_BZIP2_SUPPORT?= no
|
2012-05-01 13:16:01 -04:00
|
|
|
LOADER_DEBUG?= no
|
2002-02-22 23:35:28 -05:00
|
|
|
|
2012-05-01 13:16:01 -04:00
|
|
|
.if ${LOADER_DEBUG} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_DEBUG
|
|
|
|
|
.endif
|
2002-02-22 23:35:28 -05:00
|
|
|
.if ${LOADER_DISK_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_DISK_SUPPORT
|
|
|
|
|
.endif
|
2002-04-01 18:28:35 -05:00
|
|
|
.if ${LOADER_UFS_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_UFS_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
.if ${LOADER_CD9660_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_CD9660_SUPPORT
|
|
|
|
|
.endif
|
2012-05-01 13:16:01 -04:00
|
|
|
.if ${LOADER_ZFS_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_ZFS_SUPPORT
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../zfs
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
|
2012-05-12 16:27:33 -04:00
|
|
|
LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
|
2012-05-01 13:16:01 -04:00
|
|
|
.endif
|
2002-10-13 14:52:46 -04:00
|
|
|
.if ${LOADER_GZIP_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_GZIP_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
.if ${LOADER_BZIP2_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_BZIP2_SUPPORT
|
|
|
|
|
.endif
|
2002-02-22 23:35:28 -05:00
|
|
|
.if ${LOADER_NET_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_NET_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
.if ${LOADER_NFS_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_NFS_SUPPORT
|
|
|
|
|
.endif
|
|
|
|
|
.if ${LOADER_TFTP_SUPPORT} == "yes"
|
|
|
|
|
CFLAGS+= -DLOADER_TFTP_SUPPORT
|
|
|
|
|
.endif
|
2001-10-30 01:37:36 -05:00
|
|
|
|
2006-03-17 13:54:44 -05:00
|
|
|
.if ${MK_FORTH} != "no"
|
2002-05-28 19:09:59 -04:00
|
|
|
# Enable BootForth
|
|
|
|
|
BOOT_FORTH= yes
|
2012-05-01 13:16:01 -04:00
|
|
|
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ficl/sparc64
|
2002-05-28 19:09:59 -04:00
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|
|
|
|
.endif
|
2001-10-15 06:36:35 -04:00
|
|
|
|
2010-01-09 16:23:39 -05:00
|
|
|
# Always add MI sources
|
2001-10-15 06:36:35 -04:00
|
|
|
.PATH: ${.CURDIR}/../../common
|
2004-02-09 09:17:02 -05:00
|
|
|
.include "${.CURDIR}/../../common/Makefile.inc"
|
2001-10-15 06:36:35 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
2004-02-09 09:17:02 -05:00
|
|
|
CFLAGS+= -I.
|
2001-10-15 06:36:35 -04:00
|
|
|
|
2016-12-19 09:40:59 -05:00
|
|
|
CLEANFILES+= loader.help
|
2001-10-15 06:36:35 -04:00
|
|
|
|
2004-02-09 09:17:02 -05:00
|
|
|
LDFLAGS= -static
|
2002-05-28 19:09:59 -04:00
|
|
|
|
2004-08-16 11:45:27 -04:00
|
|
|
# Open Firmware standalone support library
|
2002-05-28 19:09:59 -04:00
|
|
|
LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
|
2001-10-15 06:36:35 -04:00
|
|
|
|
|
|
|
|
# where to get libstand from
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
2002-05-28 19:09:59 -04:00
|
|
|
|
2012-05-12 16:27:33 -04:00
|
|
|
DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
|
|
|
|
|
LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
|
2002-05-28 19:09:59 -04:00
|
|
|
|
2004-02-09 09:17:02 -05:00
|
|
|
loader.help: help.common help.sparc64
|
2002-04-02 12:08:37 -05:00
|
|
|
cat ${.ALLSRC} | \
|
|
|
|
|
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
2001-10-15 06:36:35 -04:00
|
|
|
|
2015-04-02 22:27:40 -04:00
|
|
|
.PATH: ${.CURDIR}/../../forth
|
2015-04-02 16:07:05 -04:00
|
|
|
.include "${.CURDIR}/../../forth/Makefile.inc"
|
2002-05-28 19:09:59 -04:00
|
|
|
|
2015-08-06 12:07:27 -04:00
|
|
|
FILES+= loader.rc menu.rc
|
2011-05-28 04:50:38 -04:00
|
|
|
|
2001-10-15 06:36:35 -04:00
|
|
|
.include <bsd.prog.mk>
|