7 NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH}
11 # Architecture-specific loader code
12 SRCS= conf.c metadata.c vers.c start.c
15 LOADER_DISK_SUPPORT?= yes
16 LOADER_UFS_SUPPORT?= yes
17 LOADER_CD9660_SUPPORT?= yes
18 LOADER_EXT2FS_SUPPORT?= no
19 LOADER_NET_SUPPORT?= yes
20 LOADER_NFS_SUPPORT?= yes
21 LOADER_TFTP_SUPPORT?= no
22 LOADER_GZIP_SUPPORT?= yes
23 LOADER_BZIP2_SUPPORT?= no
25 .if ${LOADER_DISK_SUPPORT} == "yes"
26 CFLAGS+= -DLOADER_DISK_SUPPORT
28 .if ${LOADER_UFS_SUPPORT} == "yes"
29 CFLAGS+= -DLOADER_UFS_SUPPORT
31 .if ${LOADER_CD9660_SUPPORT} == "yes"
32 CFLAGS+= -DLOADER_CD9660_SUPPORT
34 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
35 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
37 .if ${LOADER_GZIP_SUPPORT} == "yes"
38 CFLAGS+= -DLOADER_GZIP_SUPPORT
40 .if ${LOADER_BZIP2_SUPPORT} == "yes"
41 CFLAGS+= -DLOADER_BZIP2_SUPPORT
43 .if ${LOADER_NET_SUPPORT} == "yes"
44 CFLAGS+= -DLOADER_NET_SUPPORT
46 .if ${LOADER_NFS_SUPPORT} == "yes"
47 CFLAGS+= -DLOADER_NFS_SUPPORT
49 .if ${LOADER_TFTP_SUPPORT} == "yes"
50 CFLAGS+= -DLOADER_TFTP_SUPPORT
53 .if ${MK_FORTH} != "no"
56 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
57 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
60 # Avoid the open-close-dance for every file access as some firmwares perform
61 # an auto-negotiation on every open of the network interface and thus causes
62 # netbooting to take horribly long.
63 CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE
65 # Always add MI sources
66 .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
67 .include "${.CURDIR}/../../common/Makefile.inc"
68 CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
71 CLEANFILES+= vers.c loader.help
73 CFLAGS+= -ffreestanding -msoft-float
74 # load address. set in linker script
76 CFLAGS+= -DRELOC=${RELOC}
78 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
80 # 64-bit bridge extensions
81 CFLAGS+= -Wa,-mppc64bridge
83 # Pull in common loader code
84 .PATH: ${.CURDIR}/../../ofw/common
85 .include "${.CURDIR}/../../ofw/common/Makefile.inc"
87 # Open Firmware standalone support library
88 LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
89 CFLAGS+= -I${.CURDIR}/../../ofw/libofw
91 # where to get libstand from
92 LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
93 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
95 DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
96 LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
98 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
99 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
101 loader.help: help.common help.ofw
103 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
105 .PATH: ${.CURDIR}/../../forth
106 .include "${.CURDIR}/../../forth/Makefile.inc"
108 .if !exists(${DESTDIR}/boot/loader.rc)
112 .if !exists(${DESTDIR}/boot/menu.rc)
116 .include <bsd.prog.mk>