]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - sys/boot/sparc64/loader/Makefile
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.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_NET_SUPPORT?=    yes
17 LOADER_NFS_SUPPORT?=    yes
18 LOADER_TFTP_SUPPORT?=   yes
19 LOADER_GZIP_SUPPORT?=   yes
20 LOADER_BZIP2_SUPPORT?=  no
21
22 .if ${LOADER_DISK_SUPPORT} == "yes"
23 CFLAGS+=        -DLOADER_DISK_SUPPORT
24 .endif
25 .if ${LOADER_UFS_SUPPORT} == "yes"
26 CFLAGS+=        -DLOADER_UFS_SUPPORT
27 .endif
28 .if ${LOADER_CD9660_SUPPORT} == "yes"
29 CFLAGS+=        -DLOADER_CD9660_SUPPORT
30 .endif
31 .if ${LOADER_GZIP_SUPPORT} == "yes"
32 CFLAGS+=        -DLOADER_GZIP_SUPPORT
33 .endif
34 .if ${LOADER_BZIP2_SUPPORT} == "yes"
35 CFLAGS+=        -DLOADER_BZIP2_SUPPORT
36 .endif
37 .if ${LOADER_NET_SUPPORT} == "yes"
38 CFLAGS+=        -DLOADER_NET_SUPPORT
39 .endif
40 .if ${LOADER_NFS_SUPPORT} == "yes"
41 CFLAGS+=        -DLOADER_NFS_SUPPORT
42 .endif
43 .if ${LOADER_TFTP_SUPPORT} == "yes"
44 CFLAGS+=        -DLOADER_TFTP_SUPPORT
45 .endif
46
47 .if ${MK_FORTH} != "no"
48 # Enable BootForth
49 BOOT_FORTH=     yes
50 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/sparc64
51 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
52 .endif
53
54 # Always add MI sources
55 .PATH:          ${.CURDIR}/../../common
56 .include        "${.CURDIR}/../../common/Makefile.inc"
57 CFLAGS+=        -I${.CURDIR}/../../common
58 CFLAGS+=        -I.
59 # Avoid the open-close-dance for every file access as some firmwares perform
60 # an auto-negotiation on every open of the network interface and thus causes
61 # netbooting to take horribly long.
62 CFLAGS+=        -DNETIF_OPEN_CLOSE_ONCE
63
64 CLEANFILES+=    vers.c loader.help
65
66 LDFLAGS=        -static
67
68 # Open Firmware standalone support library
69 LIBOFW=         ${.OBJDIR}/../../ofw/libofw/libofw.a
70 CFLAGS+=        -I${.CURDIR}/../../ofw/libofw/
71
72 # where to get libstand from
73 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
74
75 DPADD=          ${LIBFICL} ${LIBOFW} ${LIBSTAND}
76 LDADD=          ${LIBFICL} ${LIBOFW} -lstand
77
78 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
79         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
80
81 loader.help: help.common help.sparc64
82         cat ${.ALLSRC} | \
83             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
84
85 .PATH: ${.CURDIR}/../../forth
86 FILES=  loader.help loader.4th support.4th loader.conf
87 FILESDIR_loader.conf=   /boot/defaults
88
89 .if !exists(${DESTDIR}/boot/loader.rc)
90 FILES+= loader.rc
91 .endif
92
93 .include <bsd.prog.mk>