6 NEWVERSWHAT= "bootstrap loader" "Open Firmware/PowerPC"
10 # Architecture-specific loader code
11 SRCS= conf.c metadata.c vers.c start.c
13 LOADER_DISK_SUPPORT?= yes
14 LOADER_UFS_SUPPORT?= yes
15 LOADER_CD9660_SUPPORT?= yes
16 LOADER_EXT2FS_SUPPORT?= no
17 LOADER_NET_SUPPORT?= yes
18 LOADER_NFS_SUPPORT?= yes
19 LOADER_TFTP_SUPPORT?= yes
20 LOADER_GZIP_SUPPORT?= yes
21 LOADER_BZIP2_SUPPORT?= no
23 .if ${LOADER_DISK_SUPPORT} == "yes"
24 CFLAGS+= -DLOADER_DISK_SUPPORT
26 .if ${LOADER_UFS_SUPPORT} == "yes"
27 CFLAGS+= -DLOADER_UFS_SUPPORT
29 .if ${LOADER_CD9660_SUPPORT} == "yes"
30 CFLAGS+= -DLOADER_CD9660_SUPPORT
32 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
33 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
35 .if ${LOADER_GZIP_SUPPORT} == "yes"
36 CFLAGS+= -DLOADER_GZIP_SUPPORT
38 .if ${LOADER_BZIP2_SUPPORT} == "yes"
39 CFLAGS+= -DLOADER_BZIP2_SUPPORT
41 .if ${LOADER_NET_SUPPORT} == "yes"
42 CFLAGS+= -DLOADER_NET_SUPPORT
44 .if ${LOADER_NFS_SUPPORT} == "yes"
45 CFLAGS+= -DLOADER_NFS_SUPPORT
47 .if ${LOADER_TFTP_SUPPORT} == "yes"
48 CFLAGS+= -DLOADER_TFTP_SUPPORT
51 .if ${MK_FORTH} != "no"
54 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
55 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
58 # Always add MI sources
59 .PATH: ${.CURDIR}/../../common
60 .include "${.CURDIR}/../../common/Makefile.inc"
61 CFLAGS+= -I${.CURDIR}/../../common
64 CLEANFILES+= vers.c loader.help
66 CFLAGS+= -ffreestanding
67 # load address. set in linker script
69 CFLAGS+= -DRELOC=${RELOC}
71 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
73 # 64-bit bridge extensions
74 CFLAGS+= -Wa,-mppc64bridge
76 # Pull in common loader code
77 .PATH: ${.CURDIR}/../../ofw/common
78 .include "${.CURDIR}/../../ofw/common/Makefile.inc"
80 # Open Firmware standalone support library
81 LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
82 CFLAGS+= -I${.CURDIR}/../../ofw/libofw
84 # where to get libstand from
85 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
87 DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
88 LDADD= ${LIBFICL} ${LIBOFW} -lstand
90 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
91 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
93 loader.help: help.common help.ofw
95 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
97 .PATH: ${.CURDIR}/../../forth
98 FILES= loader.help loader.4th support.4th loader.conf
99 FILESDIR_loader.conf= /boot/defaults
101 .if !exists(${DESTDIR}/boot/loader.rc)
105 .include <bsd.prog.mk>