]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/sparc64/loader/Makefile
MFV r267565:
[FreeBSD/FreeBSD.git] / sys / boot / sparc64 / loader / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4 MK_SSP=         no
5
6 PROG?=          loader
7 NEWVERSWHAT?=   "bootstrap loader" sparc64
8 INSTALLFLAGS=   -b
9
10 NO_PIE= yes
11
12 # Architecture-specific loader code
13 SRCS=           locore.S main.c metadata.c vers.c
14
15 LOADER_DISK_SUPPORT?=   yes
16 LOADER_UFS_SUPPORT?=    yes
17 LOADER_CD9660_SUPPORT?= yes
18 LOADER_ZFS_SUPPORT?=    no
19 LOADER_NET_SUPPORT?=    yes
20 LOADER_NFS_SUPPORT?=    yes
21 LOADER_TFTP_SUPPORT?=   yes
22 LOADER_GZIP_SUPPORT?=   yes
23 LOADER_BZIP2_SUPPORT?=  no
24 LOADER_DEBUG?=          no
25
26 .if ${LOADER_DEBUG} == "yes"
27 CFLAGS+=        -DLOADER_DEBUG
28 .endif
29 .if ${LOADER_DISK_SUPPORT} == "yes"
30 CFLAGS+=        -DLOADER_DISK_SUPPORT
31 .endif
32 .if ${LOADER_UFS_SUPPORT} == "yes"
33 CFLAGS+=        -DLOADER_UFS_SUPPORT
34 .endif
35 .if ${LOADER_CD9660_SUPPORT} == "yes"
36 CFLAGS+=        -DLOADER_CD9660_SUPPORT
37 .endif
38 .if ${LOADER_ZFS_SUPPORT} == "yes"
39 CFLAGS+=        -DLOADER_ZFS_SUPPORT
40 CFLAGS+=        -I${.CURDIR}/../../zfs
41 CFLAGS+=        -I${.CURDIR}/../../../cddl/boot/zfs
42 LIBZFSBOOT=     ${.OBJDIR}/../../zfs/libzfsboot.a
43 .endif
44 .if ${LOADER_GZIP_SUPPORT} == "yes"
45 CFLAGS+=        -DLOADER_GZIP_SUPPORT
46 .endif
47 .if ${LOADER_BZIP2_SUPPORT} == "yes"
48 CFLAGS+=        -DLOADER_BZIP2_SUPPORT
49 .endif
50 .if ${LOADER_NET_SUPPORT} == "yes"
51 CFLAGS+=        -DLOADER_NET_SUPPORT
52 .endif
53 .if ${LOADER_NFS_SUPPORT} == "yes"
54 CFLAGS+=        -DLOADER_NFS_SUPPORT
55 .endif
56 .if ${LOADER_TFTP_SUPPORT} == "yes"
57 CFLAGS+=        -DLOADER_TFTP_SUPPORT
58 .endif
59
60 .if ${MK_FORTH} != "no"
61 # Enable BootForth
62 BOOT_FORTH=     yes
63 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl
64 CFLAGS+=        -I${.CURDIR}/../../ficl/sparc64
65 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
66 .endif
67
68 # Always add MI sources
69 .PATH:          ${.CURDIR}/../../common
70 .include        "${.CURDIR}/../../common/Makefile.inc"
71 CFLAGS+=        -I${.CURDIR}/../../common
72 CFLAGS+=        -I.
73 # Avoid the open-close-dance for every file access as some firmwares perform
74 # an auto-negotiation on every open of the network interface and thus causes
75 # netbooting to take horribly long.
76 CFLAGS+=        -DNETIF_OPEN_CLOSE_ONCE
77
78 CLEANFILES+=    vers.c loader.help
79
80 LDFLAGS=        -static
81
82 # Open Firmware standalone support library
83 LIBOFW=         ${.OBJDIR}/../../ofw/libofw/libofw.a
84 CFLAGS+=        -I${.CURDIR}/../../ofw/libofw/
85
86 # where to get libstand from
87 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
88
89 DPADD=          ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
90 LDADD=          ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
91
92 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
93         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
94             ${NEWVERSWHAT}
95
96 loader.help: help.common help.sparc64
97         cat ${.ALLSRC} | \
98             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
99
100 .PATH: ${.CURDIR}/../../forth
101 FILES=  loader.help loader.4th support.4th loader.conf
102 FILES+= screen.4th frames.4th
103 FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
104 FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
105 FILESDIR_loader.conf=   /boot/defaults
106
107 .if !exists(${DESTDIR}/boot/loader.rc)
108 FILES+= loader.rc
109 .endif
110
111 .if !exists(${DESTDIR}/boot/menu.rc)
112 FILES+= menu.rc
113 .endif
114
115 .include <bsd.prog.mk>