9 NEWVERSWHAT= "bootstrap loader" pc98
11 # architecture-specific loader code
12 SRCS= main.c conf.c vers.c
13 .PATH: ${.CURDIR}/../../i386/loader
15 # Enable PXE TFTP or NFS support, not both.
16 .if defined(LOADER_TFTP_SUPPORT)
17 CFLAGS+= -DLOADER_TFTP_SUPPORT
19 CFLAGS+= -DLOADER_NFS_SUPPORT
24 # Enable PnP and ISA-PnP code.
28 .if ${MK_FORTH} != "no"
31 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
32 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
35 .if defined(LOADER_BZIP2_SUPPORT)
36 CFLAGS+= -DLOADER_BZIP2_SUPPORT
38 .if !defined(LOADER_NO_GZIP_SUPPORT)
39 CFLAGS+= -DLOADER_GZIP_SUPPORT
42 # Always add MI sources
43 .PATH: ${.CURDIR}/../../common
44 .include "${.CURDIR}/../../common/Makefile.inc"
45 CFLAGS+= -I${.CURDIR}/../../common
46 CFLAGS+= -I${.CURDIR}/../../i386
49 CLEANFILES= vers.c loader loader.bin loader.help
52 LDFLAGS= -static -Ttext 0x0
54 # pc98 standalone support library
55 LIBPC98= ${.OBJDIR}/../libpc98/libpc98.a
56 CFLAGS+= -I${.CURDIR}/..
59 CFLAGS+= -I${.CURDIR}/../btx/lib
65 # Pick up ../Makefile.inc early.
66 .include <bsd.init.mk>
68 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version
69 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT}
71 loader: loader.bin ${BTXLDR} ${BTXKERN}
72 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
73 -b ${BTXKERN} loader.bin
75 loader.bin: loader.sym
76 cp ${.ALLSRC} ${.TARGET}
77 strip -R .comment -R .note ${.TARGET}
79 loader.help: help.common help.pc98
80 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
82 .PATH: ${.CURDIR}/../../forth
83 FILES= loader loader.help loader.4th support.4th loader.conf
84 FILES+= screen.4th frames.4th beastie.4th
85 # XXX INSTALLFLAGS_loader= -b
86 FILESMODE_loader= ${BINMODE} -b
87 FILESDIR_loader.conf= /boot/defaults
89 .if !exists(${DESTDIR}/boot/loader.rc)
90 FILES+= ${.CURDIR}/../../i386/loader/loader.rc
93 # XXX crt0.o needs to be first for pxeboot(8) to work
96 DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND}
97 LDADD= ${LIBFICL} ${LIBPC98} -lstand
99 .include <bsd.prog.mk>