25 .PATH: ${SYSDIR}/teken
28 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
30 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
34 # We implement a slightly non-standard %S in that it always takes a
35 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
36 # seems to matter on arm64 where wchar_t defaults to an int instead
37 # of a short. There's no good cast to use here so just ignore the
39 CWARNFLAGS.efinet.c+= -Wno-format
40 CWARNFLAGS.efipart.c+= -Wno-format
41 CWARNFLAGS.env.c+= -Wno-format
43 .if ${MACHINE_CPUARCH} == "aarch64"
44 CFLAGS+= -mgeneral-regs-only
46 .if ${MACHINE_ARCH} == "amd64"
47 CFLAGS+= -fPIC -mno-red-zone
50 CFLAGS+= -I${EFIINCMD}
51 CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken
52 CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
53 .if ${MK_LOADER_ZFS} != "no"
55 CFLAGS+= -DEFI_ZFS_BOOT
58 # Pick up the bootstrap header for some interface items
61 # Handle FreeBSD specific %b and %D printf format specifiers
62 CFLAGS+= ${FORMAT_EXTENSIONS}
64 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
65 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"