xref: /freebsd/stand/Makefile (revision ec0ea6efa1ad229d75c394c1a9b9cac33af2b1d3)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5# For amd64 we have to build 32 and 64 bit versions of things. For
6# others we don't. LIB32LIST is a list of libraries, which if
7# included, need to be built 32-bit as well.
8.if ${MACHINE_ARCH} == "amd64"
9LIB32LIST=libsa
10.if ${MK_FORTH} != "no"
11LIB32LIST+=		ficl
12.endif
13.if ${MK_LOADER_LUA} != "no"
14LIB32LIST+=		liblua
15.endif
16.endif
17
18S.yes+=			libsa
19
20S.${MK_LOADER_OFW}+=	libofw
21S.${MK_FDT}+=		fdt
22
23S.${MK_FORTH}+=		ficl
24S.${MK_FORTH}+=		forth
25S.${MK_LOADER_LUA}+=	liblua
26S.${MK_LOADER_LUA}+=	lua
27S.yes+=			defaults
28S.yes+=			fonts
29S.yes+=			images
30S.yes+=			man
31
32.if ${MK_FORTH} != "no"
33INTERP_DEPENDS+=	forth
34.endif
35.if ${MK_LOADER_LUA} != "no"
36INTERP_DEPENDS+=	lua
37.endif
38
39.include <bsd.arch.inc.mk>
40
41S.${MK_EFI}+=		efi
42S.${MK_LOADER_UBOOT}+=	uboot
43
44.if defined(LIB32LIST)
45LIB32DEPENDS=	${LIB32LIST:S/$/32/}
46.endif
47
48.if exists(${.CURDIR}/${MACHINE}/.)
49S.yes+=         ${MACHINE}
50SUBDIR_DEPEND_${MACHINE}+=	${INTERP_DEPENDS}
51.if ${MK_FDT} != "no"
52SUBDIR_DEPEND_${MACHINE}+=	fdt
53.endif
54.if ${MK_LOADER_UBOOT} != "no"
55SUBDIR_DEPEND_${MACHINE}+=	uboot
56.endif
57.if ${MK_LOADER_OFW} != "no"
58SUBDIR_DEPEND_${MACHINE}+=	libofw
59.endif
60.endif
61
62# Build the actual subdir list from S.yes, adding in the 32-bit
63# variant if necessary.
64.for _x in ${S.yes}
65SUBDIR+=${_x}
66.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
67SUBDIR+=${_x}32
68.endif
69.if ${_x} != "libsa"
70SUBDIR_DEPEND_${_x}+=	libsa
71SUBDIR_DEPEND_${_x}32+=	libsa32
72.endif
73.endfor
74
75# Remaining dependencies
76SUBDIR_DEPEND_forth+=	ficl
77SUBDIR_DEPEND_lua+=	liblua
78
79SUBDIR_DEPEND_efi+=	${INTERP_DEPENDS}
80.if ${MK_FDT} != "no"
81SUBDIR_DEPEND_efi+=	fdt
82.endif
83
84SUBDIR_DEPEND_uboot+=	${INTERP_DEPENDS}
85.if ${MK_FDT} != "no"
86SUBDIR_DEPEND_uboot+=	fdt
87.endif
88
89SUBDIR_PARALLEL=	yes
90
91.include <bsd.subdir.mk>
92