xref: /freebsd/stand/Makefile (revision 43a5ec4eb41567cc92586503212743d89686d78f)
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
42.if ${MK_FDT} != "no"
43S.${MK_LOADER_KBOOT}+=	kboot
44.endif
45S.${MK_LOADER_UBOOT}+=	uboot
46
47.if defined(LIB32LIST)
48LIB32DEPENDS=	${LIB32LIST:S/$/32/}
49.endif
50
51.if exists(${.CURDIR}/${MACHINE}/.)
52S.yes+=         ${MACHINE}
53SUBDIR_DEPEND_${MACHINE}+=	${INTERP_DEPENDS}
54.if ${MK_FDT} != "no"
55SUBDIR_DEPEND_${MACHINE}+=	fdt
56.endif
57.if ${MK_LOADER_UBOOT} != "no"
58SUBDIR_DEPEND_${MACHINE}+=	uboot
59.endif
60.if ${MK_LOADER_OFW} != "no"
61SUBDIR_DEPEND_${MACHINE}+=	libofw
62.endif
63.endif
64
65# Build the actual subdir list from S.yes, adding in the 32-bit
66# variant if necessary.
67.for _x in ${S.yes}
68SUBDIR+=${_x}
69.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
70SUBDIR+=${_x}32
71.endif
72.if ${_x} != "libsa"
73SUBDIR_DEPEND_${_x}+=	libsa
74SUBDIR_DEPEND_${_x}32+=	libsa32
75.endif
76.endfor
77
78# Remaining dependencies
79SUBDIR_DEPEND_forth+=	ficl
80SUBDIR_DEPEND_lua+=	liblua
81
82SUBDIR_DEPEND_efi+=	${INTERP_DEPENDS}
83SUBDIR_DEPEND_kboot+=	${INTERP_DEPENDS}
84.if ${MK_FDT} != "no"
85SUBDIR_DEPEND_efi+=	fdt
86SUBDIR_DEPEND_kboot+=	fdt
87.endif
88
89SUBDIR_DEPEND_uboot+=	${INTERP_DEPENDS}
90.if ${MK_FDT} != "no"
91SUBDIR_DEPEND_uboot+=	fdt
92.endif
93
94SUBDIR_PARALLEL=	yes
95
96.include <bsd.subdir.mk>
97