6 NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH}
11 # Architecture-specific loader code
12 SRCS= start.S conf.c vers.c
15 LOADER_DISK_SUPPORT?= yes
16 LOADER_UFS_SUPPORT?= yes
17 LOADER_CD9660_SUPPORT?= no
18 LOADER_EXT2FS_SUPPORT?= no
19 LOADER_NET_SUPPORT?= yes
20 LOADER_NFS_SUPPORT?= yes
21 LOADER_TFTP_SUPPORT?= no
22 LOADER_GZIP_SUPPORT?= no
23 LOADER_BZIP2_SUPPORT?= no
25 LOADER_FDT_SUPPORT= yes
27 LOADER_FDT_SUPPORT= no
30 .if ${LOADER_DISK_SUPPORT} == "yes"
31 CFLAGS+= -DLOADER_DISK_SUPPORT
33 .if ${LOADER_UFS_SUPPORT} == "yes"
34 CFLAGS+= -DLOADER_UFS_SUPPORT
36 .if ${LOADER_CD9660_SUPPORT} == "yes"
37 CFLAGS+= -DLOADER_CD9660_SUPPORT
39 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
40 CFLAGS+= -DLOADER_EXT2FS_SUPPORT
42 .if ${LOADER_GZIP_SUPPORT} == "yes"
43 CFLAGS+= -DLOADER_GZIP_SUPPORT
45 .if ${LOADER_BZIP2_SUPPORT} == "yes"
46 CFLAGS+= -DLOADER_BZIP2_SUPPORT
48 .if ${LOADER_NET_SUPPORT} == "yes"
49 CFLAGS+= -DLOADER_NET_SUPPORT
51 .if ${LOADER_NFS_SUPPORT} == "yes"
52 CFLAGS+= -DLOADER_NFS_SUPPORT
54 .if ${LOADER_TFTP_SUPPORT} == "yes"
55 CFLAGS+= -DLOADER_TFTP_SUPPORT
57 .if ${LOADER_FDT_SUPPORT} == "yes"
58 CFLAGS+= -I${.CURDIR}/../../fdt
59 CFLAGS+= -I${.OBJDIR}/../../fdt
60 CFLAGS+= -DLOADER_FDT_SUPPORT
61 LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
64 .if !defined(NO_FORTH)
67 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
68 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
71 # Always add MI sources
72 .PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
73 .include "${.CURDIR}/../../common/Makefile.inc"
74 CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
77 CLEANFILES+= vers.c ${PROG}.help
79 CFLAGS+= -ffreestanding
81 LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
83 # Pull in common loader code
84 .PATH: ${.CURDIR}/../../uboot/common
85 .include "${.CURDIR}/../../uboot/common/Makefile.inc"
86 CFLAGS+= -I${.CURDIR}/../../uboot/common
88 # U-Boot standalone support library
89 LIBUBOOT= ${.OBJDIR}/../../uboot/lib/libuboot.a
90 CFLAGS+= -I${.CURDIR}/../../uboot/lib
91 CFLAGS+= -I${.OBJDIR}/../../uboot/lib
93 # where to get libstand from
94 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
96 DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
97 LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand
99 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
100 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
102 loader.help: help.common help.uboot
104 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
106 .PATH: ${.CURDIR}/../../forth
109 .include <bsd.prog.mk>