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