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