Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/libefi/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
.include <bsd.init.mk> | .include <bsd.init.mk> | ||||
.if ${MK_FORTH} != "no" | .if ${MK_FORTH} != "no" | ||||
.include "${BOOTSRC}/ficl.mk" | .include "${BOOTSRC}/ficl.mk" | ||||
.endif | .endif | ||||
LIB= efi | LIB= efi | ||||
INTERNALLIB= | INTERNALLIB= | ||||
WARNS?= 2 | WARNS?= 2 | ||||
SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \ | SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \ | ||||
handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c | handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c \ | ||||
key_inject.c geli_driver.c | |||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" | .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" | ||||
SRCS+= time.c | SRCS+= time.c | ||||
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" | .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" | ||||
SRCS+= time_event.c | SRCS+= time_event.c | ||||
.endif | .endif | ||||
.PATH: ${SYSDIR}/geom/eli | |||||
CFLAGS+= -D_STAND | |||||
SRCS+= g_eli_hmac.c g_eli_key.c g_eli_key_cache.c pkcs5v2.c | |||||
# We implement a slightly non-standard %S in that it always takes a | # We implement a slightly non-standard %S in that it always takes a | ||||
# CHAR16 that's common in UEFI-land instead of a wchar_t. This only | # CHAR16 that's common in UEFI-land instead of a wchar_t. This only | ||||
# seems to matter on arm64 where wchar_t defaults to an int instead | # seems to matter on arm64 where wchar_t defaults to an int instead | ||||
# of a short. There's no good cast to use here so just ignore the | # of a short. There's no good cast to use here so just ignore the | ||||
# warnings for now. | # warnings for now. | ||||
CWARNFLAGS.efinet.c+= -Wno-format | CWARNFLAGS.efinet.c+= -Wno-format | ||||
CWARNFLAGS.efipart.c+= -Wno-format | CWARNFLAGS.efipart.c+= -Wno-format | ||||
CWARNFLAGS.env.c+= -Wno-format | CWARNFLAGS.env.c+= -Wno-format | ||||
.if ${MACHINE_CPUARCH} == "aarch64" | .if ${MACHINE_CPUARCH} == "aarch64" | ||||
CFLAGS+= -mgeneral-regs-only | CFLAGS+= -mgeneral-regs-only | ||||
.endif | .endif | ||||
.if ${MACHINE_ARCH} == "amd64" | .if ${MACHINE_ARCH} == "amd64" | ||||
CFLAGS+= -fPIC -mno-red-zone | CFLAGS+= -fPIC -mno-red-zone | ||||
.endif | .endif | ||||
CFLAGS+= -I${EFIINC} | CFLAGS+= -I${EFIINC} | ||||
CFLAGS+= -I${EFIINCMD} | CFLAGS+= -I${EFIINCMD} | ||||
.if ${MK_ZFS} != "no" | .if ${MK_ZFS} != "no" | ||||
CFLAGS+= -I${ZFSSRC} | CFLAGS+= -I${ZFSSRC} | ||||
CFLAGS+= -DEFI_ZFS_BOOT | CFLAGS+= -DEFI_ZFS_BOOT | ||||
.endif | .endif | ||||
CFLAGS+= -I${SRCTOP}/stand/boot_crypto | |||||
CFLAGS+= -I${SYSDIR} | |||||
# Pick up the bootstrap header for some interface items | # Pick up the bootstrap header for some interface items | ||||
CFLAGS+= -I${LDRSRC} | CFLAGS+= -I${LDRSRC} | ||||
# Handle FreeBSD specific %b and %D printf format specifiers | # Handle FreeBSD specific %b and %D printf format specifiers | ||||
CFLAGS+= ${FORMAT_EXTENSIONS} | CFLAGS+= ${FORMAT_EXTENSIONS} | ||||
# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console | # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console | ||||
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" | .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" | ||||
CFLAGS+= -DTERM_EMU | CFLAGS+= -DTERM_EMU | ||||
.endif | .endif | ||||
#eforedepend ${OBJS}: machine | |||||
#CLEANFILES+= machine | |||||
#machine: .NOMETA | |||||
# ln -sf ${SYSDIR}/${MACHINE}/include machine | |||||
CFLAGS+= -DLIBEFI | CFLAGS+= -DLIBEFI | ||||
.include <bsd.lib.mk> | .include <bsd.lib.mk> |