1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2008-06-25 21:33:28 +00:00
|
|
|
WITHOUT_SSP=
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2004-02-09 16:01:45 +00:00
|
|
|
PROG= loader.sym
|
|
|
|
INTERNALPROG=
|
1999-06-29 21:23:26 +00:00
|
|
|
NEWVERSWHAT= "bootstrap loader" pc98
|
1999-02-03 08:39:09 +00:00
|
|
|
|
|
|
|
# architecture-specific loader code
|
2004-02-07 12:19:44 +00:00
|
|
|
SRCS= main.c conf.c vers.c
|
2000-05-29 11:58:01 +00:00
|
|
|
.PATH: ${.CURDIR}/../../i386/loader
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2000-04-14 13:51:14 +00:00
|
|
|
# Enable PXE TFTP or NFS support, not both.
|
2000-11-05 12:35:41 +00:00
|
|
|
.if defined(LOADER_TFTP_SUPPORT)
|
|
|
|
CFLAGS+= -DLOADER_TFTP_SUPPORT
|
|
|
|
.else
|
2000-04-14 13:51:14 +00:00
|
|
|
CFLAGS+= -DLOADER_NFS_SUPPORT
|
2000-11-05 12:35:41 +00:00
|
|
|
.endif
|
2000-04-14 13:51:14 +00:00
|
|
|
|
2006-11-02 00:26:45 +00:00
|
|
|
HAVE_BCACHE= yes
|
|
|
|
|
1999-02-03 08:39:09 +00:00
|
|
|
# Enable PnP and ISA-PnP code.
|
|
|
|
HAVE_PNP= yes
|
|
|
|
HAVE_ISABUS= yes
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_FORTH} != "no"
|
1999-02-03 08:39:09 +00:00
|
|
|
# Enable BootForth
|
|
|
|
BOOT_FORTH= yes
|
1999-11-25 12:46:16 +00:00
|
|
|
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
|
1999-02-03 08:39:09 +00:00
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
2000-02-05 02:21:31 +00:00
|
|
|
.endif
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2001-10-17 14:13:36 +00:00
|
|
|
.if defined(LOADER_BZIP2_SUPPORT)
|
|
|
|
CFLAGS+= -DLOADER_BZIP2_SUPPORT
|
|
|
|
.endif
|
|
|
|
.if !defined(LOADER_NO_GZIP_SUPPORT)
|
|
|
|
CFLAGS+= -DLOADER_GZIP_SUPPORT
|
|
|
|
.endif
|
|
|
|
|
1999-02-03 08:39:09 +00:00
|
|
|
# Always add MI sources
|
|
|
|
.PATH: ${.CURDIR}/../../common
|
2004-02-07 12:19:44 +00:00
|
|
|
.include "${.CURDIR}/../../common/Makefile.inc"
|
1999-02-03 08:39:09 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
2004-02-07 12:19:44 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../i386
|
|
|
|
CFLAGS+= -I.
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2004-02-13 15:26:22 +00:00
|
|
|
CLEANFILES= vers.c loader loader.bin loader.help
|
1999-02-03 08:39:09 +00:00
|
|
|
|
|
|
|
CFLAGS+= -Wall
|
2004-02-09 16:01:45 +00:00
|
|
|
LDFLAGS= -static -Ttext 0x0
|
1999-02-03 08:39:09 +00:00
|
|
|
|
|
|
|
# pc98 standalone support library
|
|
|
|
LIBPC98= ${.OBJDIR}/../libpc98/libpc98.a
|
|
|
|
CFLAGS+= -I${.CURDIR}/..
|
|
|
|
|
|
|
|
# BTX components
|
|
|
|
CFLAGS+= -I${.CURDIR}/../btx/lib
|
|
|
|
|
|
|
|
# Debug me!
|
|
|
|
#CFLAGS+= -g
|
|
|
|
#LDFLAGS+= -g
|
|
|
|
|
2004-02-07 12:19:44 +00:00
|
|
|
# Pick up ../Makefile.inc early.
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
|
|
|
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version
|
1999-06-29 21:23:26 +00:00
|
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT}
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2004-02-09 16:01:45 +00:00
|
|
|
loader: loader.bin ${BTXLDR} ${BTXKERN}
|
2000-03-31 16:03:02 +00:00
|
|
|
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
|
2004-02-07 12:19:44 +00:00
|
|
|
-b ${BTXKERN} loader.bin
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2004-02-07 12:19:44 +00:00
|
|
|
loader.bin: loader.sym
|
1999-02-03 08:39:09 +00:00
|
|
|
cp ${.ALLSRC} ${.TARGET}
|
2000-12-16 03:15:48 +00:00
|
|
|
strip -R .comment -R .note ${.TARGET}
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2004-02-07 12:19:44 +00:00
|
|
|
loader.help: help.common help.pc98
|
1999-02-03 08:39:09 +00:00
|
|
|
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
|
|
|
|
|
2002-04-25 13:31:27 +00:00
|
|
|
.PATH: ${.CURDIR}/../../forth
|
2004-02-07 12:19:44 +00:00
|
|
|
FILES= loader loader.help loader.4th support.4th loader.conf
|
2005-10-30 15:59:08 +00:00
|
|
|
FILES+= screen.4th frames.4th beastie.4th
|
2004-02-07 12:19:44 +00:00
|
|
|
# XXX INSTALLFLAGS_loader= -b
|
|
|
|
FILESMODE_loader= ${BINMODE} -b
|
2002-04-25 13:31:27 +00:00
|
|
|
FILESDIR_loader.conf= /boot/defaults
|
|
|
|
|
1999-11-16 00:38:20 +00:00
|
|
|
.if !exists(${DESTDIR}/boot/loader.rc)
|
2005-10-30 15:59:08 +00:00
|
|
|
FILES+= ${.CURDIR}/../../i386/loader/loader.rc
|
1999-02-03 08:39:09 +00:00
|
|
|
.endif
|
|
|
|
|
2004-03-14 09:41:57 +00:00
|
|
|
# XXX crt0.o needs to be first for pxeboot(8) to work
|
|
|
|
OBJS= ${BTXCRT}
|
|
|
|
|
|
|
|
DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND}
|
|
|
|
LDADD= ${LIBFICL} ${LIBPC98} -lstand
|
1999-02-03 08:39:09 +00:00
|
|
|
|
2004-02-07 12:19:44 +00:00
|
|
|
.include <bsd.prog.mk>
|