7 NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH}
11 # Architecture-specific loader code
12 SRCS= conf.c metadata.c vers.c start.c
14 LOADER_DISK_SUPPORT?= yes
15 LOADER_UFS_SUPPORT?= yes
16 LOADER_CD9660_SUPPORT?= yes
17 LOADER_EXT2FS_SUPPORT?= no
18 LOADER_NET_SUPPORT?= yes
19 LOADER_NFS_SUPPORT?= yes
20 LOADER_TFTP_SUPPORT?= no
21 LOADER_GZIP_SUPPORT?= yes
22 LOADER_BZIP2_SUPPORT?= no
24 .if ${LOADER_DISK_SUPPORT} == "yes"
25 CFLAGS+= -DLOADER_DISK_SUPPORT
27 .if ${LOADER_UFS_SUPPORT} == "yes"
28 CFLAGS+= -DLOADER_UFS_SUPPORT
30 .if ${LOADER_CD9660_SUPPORT} == "yes"
31 CFLAGS+= -DLOADER_CD9660_SUPPORT
33 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
34 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
36 .if ${LOADER_GZIP_SUPPORT} == "yes"
37 CFLAGS+= -DLOADER_GZIP_SUPPORT
39 .if ${LOADER_BZIP2_SUPPORT} == "yes"
40 CFLAGS+= -DLOADER_BZIP2_SUPPORT
42 .if ${LOADER_NET_SUPPORT} == "yes"
43 CFLAGS+= -DLOADER_NET_SUPPORT
45 .if ${LOADER_NFS_SUPPORT} == "yes"
46 CFLAGS+= -DLOADER_NFS_SUPPORT
48 .if ${LOADER_TFTP_SUPPORT} == "yes"
49 CFLAGS+= -DLOADER_TFTP_SUPPORT
52 .if ${MK_FORTH} != "no"
55 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
56 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
59 # Always add MI sources
60 .PATH: ${.CURDIR}/../../common
61 .include "${.CURDIR}/../../common/Makefile.inc"
62 CFLAGS+= -I${.CURDIR}/../../common
65 CLEANFILES+= vers.c loader.help
67 CFLAGS+= -ffreestanding -msoft-float
68 # load address. set in linker script
70 CFLAGS+= -DRELOC=${RELOC}
72 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
74 # 64-bit bridge extensions
75 CFLAGS+= -Wa,-mppc64bridge
77 # Pull in common loader code
78 .PATH: ${.CURDIR}/../../ofw/common
79 .include "${.CURDIR}/../../ofw/common/Makefile.inc"
81 # Open Firmware standalone support library
82 LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
83 CFLAGS+= -I${.CURDIR}/../../ofw/libofw
85 # where to get libstand from
86 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
88 DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
89 LDADD= ${LIBFICL} ${LIBOFW} -lstand
91 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
92 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
94 loader.help: help.common help.ofw
96 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
98 .PATH: ${.CURDIR}/../../forth
99 FILES= loader.help loader.4th support.4th loader.conf
100 FILESDIR_loader.conf= /boot/defaults
102 .if !exists(${DESTDIR}/boot/loader.rc)
106 .include <bsd.prog.mk>