5 .if ${MK_FORTH} != "no"
6 .include "${BOOTSRC}/ficl.mk"
13 SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \
14 handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c
16 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
18 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
22 # We implement a slightly non-standard %S in that it always takes a
23 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
24 # seems to matter on arm64 where wchar_t defaults to an int instead
25 # of a short. There's no good cast to use here so just ignore the
27 CWARNFLAGS.efinet.c+= -Wno-format
28 CWARNFLAGS.efipart.c+= -Wno-format
29 CWARNFLAGS.env.c+= -Wno-format
31 .if ${MACHINE_CPUARCH} == "aarch64"
32 CFLAGS+= -mgeneral-regs-only
34 .if ${MACHINE_ARCH} == "amd64"
35 CFLAGS+= -fPIC -mno-red-zone
38 CFLAGS+= -I${EFIINCMD}
41 CFLAGS+= -DEFI_ZFS_BOOT
44 # Pick up the bootstrap header for some interface items
47 # Handle FreeBSD specific %b and %D printf format specifiers
48 CFLAGS+= ${FORMAT_EXTENSIONS}
50 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
51 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"