]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/sparc64/loader/Makefile
add -n option to suppress clearing the build tree and add -DNO_CLEAN
[FreeBSD/FreeBSD.git] / sys / boot / sparc64 / loader / Makefile
1 # $FreeBSD$
2
3 WITHOUT_SSP=
4
5 .include <bsd.own.mk>
6
7 PROG=           loader
8 NEWVERSWHAT=    "bootstrap loader" sparc64
9 INSTALLFLAGS=   -b
10
11 # Architecture-specific loader code
12 SRCS=           locore.S main.c metadata.c vers.c
13
14 LOADER_DISK_SUPPORT?=   yes
15 LOADER_UFS_SUPPORT?=    yes
16 LOADER_CD9660_SUPPORT?= yes
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
23 .if ${LOADER_DISK_SUPPORT} == "yes"
24 CFLAGS+=        -DLOADER_DISK_SUPPORT
25 .endif
26 .if ${LOADER_UFS_SUPPORT} == "yes"
27 CFLAGS+=        -DLOADER_UFS_SUPPORT
28 .endif
29 .if ${LOADER_CD9660_SUPPORT} == "yes"
30 CFLAGS+=        -DLOADER_CD9660_SUPPORT
31 .endif
32 .if ${LOADER_GZIP_SUPPORT} == "yes"
33 CFLAGS+=        -DLOADER_GZIP_SUPPORT
34 .endif
35 .if ${LOADER_BZIP2_SUPPORT} == "yes"
36 CFLAGS+=        -DLOADER_BZIP2_SUPPORT
37 .endif
38 .if ${LOADER_NET_SUPPORT} == "yes"
39 CFLAGS+=        -DLOADER_NET_SUPPORT
40 .endif
41 .if ${LOADER_NFS_SUPPORT} == "yes"
42 CFLAGS+=        -DLOADER_NFS_SUPPORT
43 .endif
44 .if ${LOADER_TFTP_SUPPORT} == "yes"
45 CFLAGS+=        -DLOADER_TFTP_SUPPORT
46 .endif
47
48 .if ${MK_FORTH} != "no"
49 # Enable BootForth
50 BOOT_FORTH=     yes
51 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/sparc64
52 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
53 .endif
54
55 # Always add MI sources 
56 .PATH:          ${.CURDIR}/../../common
57 .include        "${.CURDIR}/../../common/Makefile.inc"
58 CFLAGS+=        -I${.CURDIR}/../../common
59 CFLAGS+=        -I.
60
61 CLEANFILES+=    vers.c loader.help
62
63 LDFLAGS=        -static
64
65 # Open Firmware standalone support library
66 LIBOFW=         ${.OBJDIR}/../../ofw/libofw/libofw.a
67 CFLAGS+=        -I${.CURDIR}/../../ofw/libofw/
68
69 # where to get libstand from
70 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
71
72 DPADD=          ${LIBFICL} ${LIBOFW} ${LIBSTAND}
73 LDADD=          ${LIBFICL} ${LIBOFW} -lstand
74
75 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
76         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
77
78 loader.help: help.common help.sparc64
79         cat ${.ALLSRC} | \
80             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
81
82 .PATH: ${.CURDIR}/../../forth
83 FILES=  loader.help loader.4th support.4th loader.conf
84 FILESDIR_loader.conf=   /boot/defaults
85
86 .if !exists(${DESTDIR}/boot/loader.rc)
87 FILES+= loader.rc
88 .endif
89
90 .include <bsd.prog.mk>