Skip to content

Commit

Permalink
Move EFI up to common makefile. There's no need for all these .if's
Browse files Browse the repository at this point in the history
based on architecture.

Sponsored by: Netflix
  • Loading branch information
bsdimp committed Feb 27, 2018
1 parent 6ef82c0 commit 9e74797
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 13 deletions.
4 changes: 3 additions & 1 deletion share/mk/src.opts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ __DEFAULT_YES_OPTIONS = \
LPR \
LS_COLORS \
LZMA_SUPPORT \
LOADER_EFI \
LOADER_GELI \
MAIL \
MAILWRAPPER \
Expand Down Expand Up @@ -285,8 +286,9 @@ BROKEN_OPTIONS+=LIBSOFT
.if ${__T:Mmips*}
BROKEN_OPTIONS+=SSP
.endif
# EFI doesn't exist on mips, powerpc, sparc or riscv.
.if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*}
BROKEN_OPTIONS+=EFI
BROKEN_OPTIONS+=EFI LOADER_EFI
.endif
.if ${__T:Mmips64*}
# profiling won't work on MIPS64 because there is only assembly for o32
Expand Down
4 changes: 4 additions & 0 deletions stand/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SUBDIR+= man

.include <bsd.arch.inc.mk>

.if ${MK_EFI} != "no" && ${MK_LOADER_EFI} != "no"
SUBDIR+= efi
.endif

.if exists(${.CURDIR}/${MACHINE}/.)
SUBDIR+= ${MACHINE}
.endif
Expand Down
1 change: 0 additions & 1 deletion stand/Makefile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ SUBDIR+= ficl32
SUBDIR+= liblua32
.endif

SUBDIR+= efi
SUBDIR+= userboot

.if ${MK_LOADER_GELI} == "yes"
Expand Down
2 changes: 1 addition & 1 deletion stand/Makefile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ SUBDIR+= fdt
SUBDIR+= zfs
.endif

SUBDIR+= efi uboot
SUBDIR+= uboot
2 changes: 0 additions & 2 deletions stand/Makefile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ SUBDIR+= fdt
.if ${MK_ZFS} != "no"
SUBDIR+= zfs
.endif

SUBDIR+= efi
2 changes: 0 additions & 2 deletions stand/Makefile.i386
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ SUBDIR+= geli
.if ${MK_ZFS} != "no"
SUBDIR+= zfs
.endif

SUBDIR+= efi
6 changes: 0 additions & 6 deletions stand/efi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ NO_OBJ=t
# than 4.5 supports it.
.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500

.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
.if ${MK_FDT} != "no"
SUBDIR+= fdt
.endif
.endif

.if ${MACHINE_CPUARCH} == "aarch64" || \
${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm"
SUBDIR+= libefi loader boot1
.endif

.endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500

Expand Down

0 comments on commit 9e74797

Please sign in to comment.