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