xref: /freebsd/stand/Makefile (revision ac5f382a9d0a26685b92b49abb845d3b30ea5f91)
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 ficl liblua
10.endif
11
12S.yes+=			libsa
13
14S.${MK_LOADER_OFW}+=	libofw
15S.${MK_FDT}+=		fdt
16
17S.${MK_FORTH}+=		ficl
18S.${MK_FORTH}+=		forth
19S.${MK_LOADER_LUA}+=	liblua
20S.${MK_LOADER_LUA}+=	lua
21S.yes+=			defaults
22S.yes+=			man
23
24.if ${MK_FORTH} != "no"
25INTERP_DEPENDS+=	forth
26.endif
27.if ${MK_LOADER_LUA} != "no"
28INTERP_DEPENDS+=	lua
29.endif
30
31.include <bsd.arch.inc.mk>
32
33S.${MK_EFI}+=		efi
34S.${MK_LOADER_UBOOT}+=	uboot
35
36.if defined(LIB32LIST)
37LIB32DEPENDS=	${LIB32LIST:S/$/32/}
38.endif
39
40.if exists(${.CURDIR}/${MACHINE}/.)
41S.yes+=         ${MACHINE}
42SUBDIR_DEPEND_${MACHINE}+=	${INTERP_DEPENDS}
43.if ${MK_FDT} != "no"
44SUBDIR_DEPEND_${MACHINE}+=	fdt
45.endif
46.if ${MK_LOADER_UBOOT} != "no"
47SUBDIR_DEPEND_${MACHINE}+=	uboot
48.endif
49.if ${MK_LOADER_OFW} != "no"
50SUBDIR_DEPEND_${MACHINE}+=	libofw
51.endif
52.endif
53
54# Build the actual subdir list from S.yes, adding in the 32-bit
55# variant if necessary.
56.for _x in ${S.yes}
57SUBDIR+=${_x}
58.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
59SUBDIR+=${_x}32
60.endif
61.if ${_x} != "libsa"
62SUBDIR_DEPEND_${_x}+=	libsa
63SUBDIR_DEPEND_${_x}32+=	libsa32
64.endif
65.endfor
66
67# Remaining dependencies
68SUBDIR_DEPEND_libsa32+=	libsa
69
70SUBDIR_DEPEND_forth+=	ficl
71SUBDIR_DEPEND_lua+=	liblua
72
73SUBDIR_DEPEND_efi+=	fdt
74
75SUBDIR_PARALLEL=	yes
76
77.include <bsd.subdir.mk>
78