]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/Makefile
Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846
[FreeBSD/FreeBSD.git] / stand / Makefile
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"
9 LIB32LIST=libsa
10 .if ${MK_FORTH} != "no"
11 LIB32LIST+=             ficl
12 .endif
13 .if ${MK_LOADER_LUA} != "no"
14 LIB32LIST+=             liblua
15 .endif
16 .endif
17
18 S.yes+=                 libsa
19
20 S.${MK_LOADER_OFW}+=    libofw
21 S.${MK_FDT}+=           fdt
22
23 S.${MK_FORTH}+=         ficl
24 S.${MK_FORTH}+=         forth
25 S.${MK_LOADER_LUA}+=    liblua
26 S.${MK_LOADER_LUA}+=    lua
27 S.yes+=                 defaults
28 S.yes+=                 fonts
29 S.yes+=                 images
30 S.yes+=                 man
31
32 .if ${MK_FORTH} != "no"
33 INTERP_DEPENDS+=        forth
34 .endif
35 .if ${MK_LOADER_LUA} != "no"
36 INTERP_DEPENDS+=        lua
37 .endif
38
39 .include <bsd.arch.inc.mk>
40
41 S.${MK_EFI}+=           efi
42 .if ${MK_FDT} != "no"
43 S.${MK_LOADER_KBOOT}+=  kboot
44 .endif
45 S.${MK_LOADER_UBOOT}+=  uboot
46
47 .if defined(LIB32LIST)
48 LIB32DEPENDS=   ${LIB32LIST:S/$/32/}
49 .endif
50
51 .if exists(${.CURDIR}/${MACHINE}/.)
52 S.yes+=         ${MACHINE}
53 SUBDIR_DEPEND_${MACHINE}+=      ${INTERP_DEPENDS}
54 .if ${MK_FDT} != "no"
55 SUBDIR_DEPEND_${MACHINE}+=      fdt
56 .endif
57 .if ${MK_LOADER_UBOOT} != "no"
58 SUBDIR_DEPEND_${MACHINE}+=      uboot
59 .endif
60 .if ${MK_LOADER_OFW} != "no"
61 SUBDIR_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}
68 SUBDIR+=${_x}
69 .if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
70 SUBDIR+=${_x}32
71 .endif
72 .if ${_x} != "libsa"
73 SUBDIR_DEPEND_${_x}+=   libsa
74 SUBDIR_DEPEND_${_x}32+= libsa32
75 .endif
76 .endfor
77
78 # Remaining dependencies
79 SUBDIR_DEPEND_forth+=   ficl
80 SUBDIR_DEPEND_lua+=     liblua
81
82 SUBDIR_DEPEND_efi+=     ${INTERP_DEPENDS}
83 SUBDIR_DEPEND_kboot+=   ${INTERP_DEPENDS}
84 .if ${MK_FDT} != "no"
85 SUBDIR_DEPEND_efi+=     fdt
86 SUBDIR_DEPEND_kboot+=   fdt
87 .endif
88
89 SUBDIR_DEPEND_uboot+=   ${INTERP_DEPENDS}
90 .if ${MK_FDT} != "no"
91 SUBDIR_DEPEND_uboot+=   fdt
92 .endif
93
94 SUBDIR_PARALLEL=        yes
95
96 .include <bsd.subdir.mk>
97
98 # Simplified way to build-test the most important build combinations for the
99 # loader.
100 universe:
101         sh ${SRCTOP}/tools/boot/universe.sh