aboutsummaryrefslogtreecommitdiff
path: root/stand/Makefile
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-03-01 19:50:55 +0000
committerWarner Losh <imp@FreeBSD.org>2018-03-01 19:50:55 +0000
commitf86dd9968654db056447f7ee0de165b6ab676c54 (patch)
tree90b8603fe75d23849f8afcc0109c6e526c4b2691 /stand/Makefile
parent32bd1c2bb38f96c6d37b4c76a139058357e46668 (diff)
Create LOADER_UBOOT, and LOADER_OFW. Move these options out of
Makefile.${MACHINE_ARCH} and remove the now-empty files. Generate the *32 directories on the necessary architectures (well, currently only amd64) on the fly. Remove LOADER_EFI variable and co-locate it with EFI. Differential Review: https://reviews.freebsd.org/D14546
Notes
Notes: svn path=/head/; revision=330248
Diffstat (limited to 'stand/Makefile')
-rw-r--r--stand/Makefile45
1 files changed, 30 insertions, 15 deletions
diff --git a/stand/Makefile b/stand/Makefile
index a22d771acb68..59eb324a8258 100644
--- a/stand/Makefile
+++ b/stand/Makefile
@@ -2,28 +2,43 @@
.include <src.opts.mk>
-SUBDIR+= libsa
-.if ${MK_FORTH} != "no"
-# Build the add-in FORTH interpreter.
-SUBDIR+= ficl
-SUBDIR+= forth
-.endif
-.if ${MK_LOADER_LUA} != "no"
-SUBDIR+= liblua
-SUBDIR+= lua
+# For amd64 we have to build 32 and 64 bit versions of things. For
+# others we don't. LIB32LIST is a list of libraries, which if
+# included, need to be built 32-bit as well.
+.if ${MACHINE_ARCH} == "amd64"
+LIB32LIST=libsa ficl liblua zfs
.endif
-SUBDIR+= defaults
-SUBDIR+= man
+S.yes+= libsa
+
+S.${MK_FORTH}+= ficl
+S.${MK_FORTH}+= forth
+S.${MK_LOADER_LUA}+= liblua
+S.${MK_LOADER_LUA}+= lua
+S.${MK_FDT}+= fdt
+S.${MK_LOADER_OFW}+= ofw
+S.${MK_ZFS}+= zfs
+S.yes+= defaults
+S.yes+= man
+
+S.${MK_LOADER_GELI}+= geli
.include <bsd.arch.inc.mk>
-.if ${MK_EFI} != "no" && ${MK_LOADER_EFI} != "no"
-SUBDIR+= efi
-.endif
+S.${MK_EFI}+= efi
+S.${MK_LOADER_UBOOT}+= uboot
.if exists(${.CURDIR}/${MACHINE}/.)
-SUBDIR+= ${MACHINE}
+S.yes+= ${MACHINE}
+.endif
+
+# Build the actual subdir list from S.yes, adding in the 32-bit
+# variant if necessary.
+.for _x in ${S.yes}
+SUBDIR+=${_x}
+.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
+SUBDIR+=${_x}32
.endif
+.endfor
.include <bsd.subdir.mk>