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