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