loader: rename zfsloader to loader
[unleashed.git] / usr / src / boot / sys / boot / sparc64 / loader / Makefile
blob484067b9c0d795e413dbc22e0d2f9c2a98dd3696
1 # $FreeBSD$
3 .include <src.opts.mk>
4 MK_SSP= no
5 MAN=
7 PROG?= loader
8 NEWVERSWHAT?= "ZFS enabled bootstrap loader" sparc64
9 INSTALLFLAGS= -b
11 # Architecture-specific loader code
12 SRCS= locore.S main.c metadata.c vers.c
14 LOADER_DISK_SUPPORT?= yes
15 LOADER_UFS_SUPPORT?= yes
16 LOADER_CD9660_SUPPORT?= yes
17 LOADER_ZFS_SUPPORT?= no
18 LOADER_NET_SUPPORT?= yes
19 LOADER_NFS_SUPPORT?= yes
20 LOADER_TFTP_SUPPORT?= yes
21 LOADER_GZIP_SUPPORT?= yes
22 LOADER_BZIP2_SUPPORT?= no
23 LOADER_DEBUG?= no
25 .if ${LOADER_DEBUG} == "yes"
26 CFLAGS+= -DLOADER_DEBUG
27 .endif
28 .if ${LOADER_DISK_SUPPORT} == "yes"
29 CFLAGS+= -DLOADER_DISK_SUPPORT
30 .endif
31 .if ${LOADER_UFS_SUPPORT} == "yes"
32 CFLAGS+= -DLOADER_UFS_SUPPORT
33 .endif
34 .if ${LOADER_CD9660_SUPPORT} == "yes"
35 CFLAGS+= -DLOADER_CD9660_SUPPORT
36 .endif
37 .if ${LOADER_ZFS_SUPPORT} == "yes"
38 CFLAGS+= -DLOADER_ZFS_SUPPORT
39 CFLAGS+= -I${.CURDIR}/../../zfs
40 CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs
41 LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a
42 .endif
43 .if ${LOADER_GZIP_SUPPORT} == "yes"
44 CFLAGS+= -DLOADER_GZIP_SUPPORT
45 .endif
46 .if ${LOADER_BZIP2_SUPPORT} == "yes"
47 CFLAGS+= -DLOADER_BZIP2_SUPPORT
48 .endif
49 .if ${LOADER_NET_SUPPORT} == "yes"
50 CFLAGS+= -DLOADER_NET_SUPPORT
51 .endif
52 .if ${LOADER_NFS_SUPPORT} == "yes"
53 CFLAGS+= -DLOADER_NFS_SUPPORT
54 .endif
55 .if ${LOADER_TFTP_SUPPORT} == "yes"
56 CFLAGS+= -DLOADER_TFTP_SUPPORT
57 .endif
59 .if ${MK_FORTH} != "no"
60 # Enable BootForth
61 BOOT_FORTH= yes
62 CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
63 CFLAGS+= -I${.CURDIR}/../../ficl/sparc64
64 LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
65 .endif
67 # Always add MI sources
68 .PATH: ${.CURDIR}/../../common
69 .include "${.CURDIR}/../../common/Makefile.inc"
70 CFLAGS+= -I${.CURDIR}/../../common
71 CFLAGS+= -I.
73 CLEANFILES+= vers.c loader.help
75 LDFLAGS= -static
77 # Open Firmware standalone support library
78 LIBOFW= ${.OBJDIR}/../../ofw/libofw/libofw.a
79 CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
81 # where to get libstand from
82 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
84 DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
85 LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
87 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
88 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
89 ${NEWVERSWHAT}
91 loader.help: help.common help.sparc64
92 cat ${.ALLSRC} | \
93 awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
95 .PATH: ${.CURDIR}/../../forth
96 .include "${.CURDIR}/../../forth/Makefile.inc"
98 FILES+= loader.rc menu.rc
100 .include <bsd.prog.mk>