1LOADER_NET_SUPPORT?= yes 2LOADER_MD_SUPPORT?= yes 3 4.include <bsd.init.mk> 5 6LIB= efi 7WARNS?= 2 8 9SRCS= delay.c \ 10 devicename.c \ 11 devpath.c \ 12 efi_console.c \ 13 efi_driver_utils.c \ 14 efichar.c \ 15 eficom.c \ 16 efienv.c \ 17 efihttp.c \ 18 efinet.c \ 19 efipart.c \ 20 efizfs.c \ 21 env.c \ 22 errno.c \ 23 handles.c \ 24 libefi.c \ 25 wchar.c 26 27.PATH: ${SYSDIR}/teken 28SRCS+= teken.c 29 30.if ${MACHINE_CPUARCH} == "amd64" 31SRCS+= time.c 32.elif ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv" 33SRCS+= time_event.c 34.elif ${MACHINE_CPUARCH} == "aarch64" 35SRCS+= time_arm64.c 36.endif 37 38# We implement a slightly non-standard %S in that it always takes a 39# CHAR16 that's common in UEFI-land instead of a wchar_t. This only 40# seems to matter on arm64 where wchar_t defaults to an int instead 41# of a short. There's no good cast to use here so just ignore the 42# warnings for now. 43CWARNFLAGS.efinet.c+= -Wno-format 44CWARNFLAGS.efipart.c+= -Wno-format 45CWARNFLAGS.env.c+= -Wno-format 46 47.if ${MACHINE_CPUARCH} == "aarch64" 48CFLAGS+= -mgeneral-regs-only 49.endif 50.if ${MACHINE_ARCH} == "amd64" 51CFLAGS+= -fPIC -mno-red-zone 52.endif 53CFLAGS+= -I${EFIINC} -I${EDK2INC} 54CFLAGS+= -I${EFIINCMD} 55CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite 56CFLAGS.efi_console.c+= -I${.CURDIR}/../loader 57CFLAGS.teken.c+= -I${SRCTOP}/sys/teken 58.if ${MK_LOADER_ZFS} != "no" 59CFLAGS+= -I${SAZFSSRC} 60CFLAGS+= -I${SYSDIR}/cddl/boot/zfs 61CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/common 62CFLAGS+= -DEFI_ZFS_BOOT 63.endif 64 65# Pick up the bootstrap header for some interface items 66CFLAGS+= -I${LDRSRC} 67 68# Handle FreeBSD specific %b and %D printf format specifiers 69CFLAGS+= ${FORMAT_EXTENSIONS} 70 71CFLAGS+= -DTERM_EMU 72 73.include "${BOOTSRC}/veriexec.mk" 74 75.include <bsd.lib.mk> 76