2001-10-15 10:36:35 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
BASE= loader
|
|
|
|
PROG= ${BASE}
|
2002-05-28 23:09:59 +00:00
|
|
|
STRIP=
|
2001-10-15 10:36:35 +00:00
|
|
|
NEWVERSWHAT= "bootstrap loader" sparc64
|
2002-04-02 17:08:37 +00:00
|
|
|
BINDIR?= /boot
|
|
|
|
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-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-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
|
|
|
|
.if exists(${.OBJDIR}/../../ficl/libficl.a)
|
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
|
|
|
.else
|
|
|
|
LIBFICL= ${.CURDIR}/../../ficl/libficl.a
|
|
|
|
.endif
|
|
|
|
.endif
|
2001-10-15 10:36:35 +00:00
|
|
|
|
|
|
|
# Always add MI sources
|
|
|
|
.PATH: ${.CURDIR}/../../common
|
|
|
|
.include <${.CURDIR}/../../common/Makefile.inc>
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../.. -I.
|
|
|
|
|
2002-07-07 18:23:10 +00:00
|
|
|
CLEANFILES+= vers.c ${BASE}.help
|
2001-10-15 10:36:35 +00:00
|
|
|
|
2002-05-10 09:26:35 +00:00
|
|
|
CFLAGS+= -ffreestanding
|
2002-04-02 17:08:37 +00:00
|
|
|
LDFLAGS= -nostdlib -static
|
2002-05-28 23:09:59 +00:00
|
|
|
|
|
|
|
# Openfirmware standalone support library
|
|
|
|
LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
|
2001-10-15 10:36:35 +00:00
|
|
|
|
|
|
|
# where to get libstand from
|
|
|
|
#XXX need a better way to do this
|
|
|
|
LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a
|
|
|
|
.if !exists(${LIBSTAND})
|
|
|
|
LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a
|
|
|
|
.if !exists(${LIBSTAND})
|
|
|
|
LIBSTAND= -lstand
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
2002-05-28 23:09:59 +00:00
|
|
|
|
2002-07-07 18:23:10 +00:00
|
|
|
LDADD= ${LIBFICL} ${LIBSTAND} ${LIBOFW}
|
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
|
|
|
|
2002-04-02 17:08:37 +00:00
|
|
|
${BASE}.help: help.common help.sparc64
|
|
|
|
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
|
|
|
|
FILES= ${BASE}.help loader.4th support.4th loader.conf
|
|
|
|
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
|
|
|
|
|
|
|
|
# There are no things relevant to all boot parts of FreeBSD/sparc64 yet.
|
|
|
|
#.include <${.CURDIR}/../Makefile.inc>
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
2002-05-28 23:09:59 +00:00
|
|
|
|
|
|
|
.if exists(${.CURDIR}/../../../sparc64/include)
|
|
|
|
beforedepend ${OBJS}: machine
|
|
|
|
|
|
|
|
machine:
|
|
|
|
ln -sf ${.CURDIR}/../../../sparc64/include machine
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CLEANFILES+= machine
|