7 NEWVERSWHAT= "bootstrap loader" pc98
9 # architecture-specific loader code
10 SRCS= main.c conf.c vers.c
11 .PATH: ${.CURDIR}/../../i386/loader
13 # Enable PXE TFTP or NFS support, not both.
14 .if defined(LOADER_TFTP_SUPPORT)
15 CFLAGS+= -DLOADER_TFTP_SUPPORT
17 CFLAGS+= -DLOADER_NFS_SUPPORT
22 # Enable PnP and ISA-PnP code.
26 .if ${MK_FORTH} != "no"
29 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
30 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
33 .if defined(LOADER_BZIP2_SUPPORT)
34 CFLAGS+= -DLOADER_BZIP2_SUPPORT
36 .if !defined(LOADER_NO_GZIP_SUPPORT)
37 CFLAGS+= -DLOADER_GZIP_SUPPORT
40 # Always add MI sources
41 .PATH: ${.CURDIR}/../../common
42 .include "${.CURDIR}/../../common/Makefile.inc"
43 CFLAGS+= -I${.CURDIR}/../../common
44 CFLAGS+= -I${.CURDIR}/../../i386
47 CLEANFILES= vers.c loader loader.bin loader.help
50 LDFLAGS= -static -Ttext 0x0
52 # pc98 standalone support library
53 LIBPC98= ${.OBJDIR}/../libpc98/libpc98.a
54 CFLAGS+= -I${.CURDIR}/..
57 CFLAGS+= -I${.CURDIR}/../btx/lib
63 # Pick up ../Makefile.inc early.
64 .include <bsd.init.mk>
66 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version
67 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT}
69 loader: loader.bin ${BTXLDR} ${BTXKERN}
70 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
71 -b ${BTXKERN} loader.bin
73 loader.bin: loader.sym
74 cp ${.ALLSRC} ${.TARGET}
75 strip -R .comment -R .note ${.TARGET}
77 loader.help: help.common help.pc98
78 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
80 .PATH: ${.CURDIR}/../../forth
81 FILES= loader loader.help loader.4th support.4th loader.conf
82 FILES+= screen.4th frames.4th beastie.4th
83 # XXX INSTALLFLAGS_loader= -b
84 FILESMODE_loader= ${BINMODE} -b
85 FILESDIR_loader.conf= /boot/defaults
87 .if !exists(${DESTDIR}/boot/loader.rc)
88 FILES+= ${.CURDIR}/../../i386/loader/loader.rc
91 # XXX crt0.o needs to be first for pxeboot(8) to work
94 DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND}
95 LDADD= ${LIBFICL} ${LIBPC98} -lstand
97 .include <bsd.prog.mk>