2001-10-15 10:36:35 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
PROG= loader
|
2001-10-15 10:36:35 +00:00
|
|
|
NEWVERSWHAT= "bootstrap loader" sparc64
|
2002-04-02 17:08:37 +00:00
|
|
|
INSTALLFLAGS= -b
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2002-05-28 23:09:59 +00:00
|
|
|
# Architecture-specific loader code
|
2002-07-07 18:23:10 +00:00
|
|
|
SRCS= locore.S main.c metadata.c vers.c
|
2002-02-23 04:35:28 +00:00
|
|
|
|
2002-04-02 17:08:37 +00:00
|
|
|
LOADER_DISK_SUPPORT?= yes
|
|
|
|
LOADER_UFS_SUPPORT?= yes
|
2002-06-21 22:34:51 +00:00
|
|
|
LOADER_CD9660_SUPPORT?= yes
|
2002-07-07 23:08:22 +00:00
|
|
|
LOADER_NET_SUPPORT?= yes
|
|
|
|
LOADER_NFS_SUPPORT?= yes
|
|
|
|
LOADER_TFTP_SUPPORT?= yes
|
2002-10-13 18:52:46 +00:00
|
|
|
LOADER_GZIP_SUPPORT?= yes
|
|
|
|
LOADER_BZIP2_SUPPORT?= no
|
2002-02-23 04:35:28 +00:00
|
|
|
|
|
|
|
.if ${LOADER_DISK_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_DISK_SUPPORT
|
|
|
|
.endif
|
2002-04-01 23:28:35 +00:00
|
|
|
.if ${LOADER_UFS_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_UFS_SUPPORT
|
|
|
|
.endif
|
|
|
|
.if ${LOADER_CD9660_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_CD9660_SUPPORT
|
|
|
|
.endif
|
2002-10-13 18:52:46 +00:00
|
|
|
.if ${LOADER_GZIP_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_GZIP_SUPPORT
|
|
|
|
.endif
|
|
|
|
.if ${LOADER_BZIP2_SUPPORT} == "yes"
|
|
|
|
CFLAGS+= -DLOADER_BZIP2_SUPPORT
|
|
|
|
.endif
|
2002-02-23 04:35:28 +00: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 06:37:36 +00:00
|
|
|
|
2002-05-28 23:09:59 +00:00
|
|
|
.if !defined(NOFORTH)
|
|
|
|
# Enable BootForth
|
|
|
|
BOOT_FORTH= yes
|
|
|
|
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/sparc64
|
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|
|
|
.endif
|
2001-10-15 10:36:35 +00:00
|
|
|
|
|
|
|
# Always add MI sources
|
|
|
|
.PATH: ${.CURDIR}/../../common
|
2004-02-09 14:17:02 +00:00
|
|
|
.include "${.CURDIR}/../../common/Makefile.inc"
|
2001-10-15 10:36:35 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
2004-02-09 14:17:02 +00:00
|
|
|
CFLAGS+= -I.
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
CLEANFILES+= vers.c loader.help
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
LDFLAGS= -static
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2004-08-16 15:45:27 +00:00
|
|
|
# Open Firmware standalone support library
|
2002-05-28 23:09:59 +00:00
|
|
|
LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
|
2001-10-15 10:36:35 +00:00
|
|
|
|
|
|
|
# where to get libstand from
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
|
|
|
|
LDADD= ${LIBFICL} ${LIBOFW} -lstand
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2002-07-07 18:23:10 +00:00
|
|
|
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
2002-05-28 23:09:59 +00:00
|
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2004-02-09 14:17:02 +00:00
|
|
|
loader.help: help.common help.sparc64
|
2002-04-02 17:08:37 +00:00
|
|
|
cat ${.ALLSRC} | \
|
|
|
|
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2002-05-28 23:09:59 +00:00
|
|
|
.PATH: ${.CURDIR}/../../forth
|
2004-02-09 14:17:02 +00:00
|
|
|
FILES= loader.help loader.4th support.4th loader.conf
|
2002-05-28 23:09:59 +00:00
|
|
|
FILESDIR_loader.conf= /boot/defaults
|
|
|
|
|
2001-10-15 10:36:35 +00:00
|
|
|
.if !exists(${DESTDIR}/boot/loader.rc)
|
2002-05-28 23:09:59 +00:00
|
|
|
FILES+= loader.rc
|
2001-10-15 10:36:35 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|