26 .PATH: ${SYSDIR}/teken
29 .if ${MACHINE_CPUARCH} == "amd64"
31 .elif ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv"
33 .elif ${MACHINE_CPUARCH} == "aarch64"
37 # We implement a slightly non-standard %S in that it always takes a
38 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
39 # seems to matter on arm64 where wchar_t defaults to an int instead
40 # of a short. There's no good cast to use here so just ignore the
42 CWARNFLAGS.efinet.c+= -Wno-format
43 CWARNFLAGS.efipart.c+= -Wno-format
44 CWARNFLAGS.env.c+= -Wno-format
46 .if ${MACHINE_CPUARCH} == "aarch64"
47 CFLAGS+= -mgeneral-regs-only
49 .if ${MACHINE_ARCH} == "amd64"
50 CFLAGS+= -fPIC -mno-red-zone
53 CFLAGS+= -I${EFIINCMD}
54 CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
55 CFLAGS.efi_console.c+= -I${.CURDIR}/../loader
56 CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
57 .if ${MK_LOADER_ZFS} != "no"
59 CFLAGS+= -I${SYSDIR}/cddl/boot/zfs
60 CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/common
61 CFLAGS+= -DEFI_ZFS_BOOT
64 # Pick up the bootstrap header for some interface items
67 # Handle FreeBSD specific %b and %D printf format specifiers
68 CFLAGS+= ${FORMAT_EXTENSIONS}
72 .include "${BOOTSRC}/veriexec.mk"