2001-06-09 16:49:51 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-10-29 05:26:59 +00:00
|
|
|
.include <bsd.init.mk>
|
2016-10-25 14:01:13 +00:00
|
|
|
|
2004-11-28 00:30:22 +00:00
|
|
|
LIB= efi
|
2016-01-12 02:17:39 +00:00
|
|
|
WARNS?= 2
|
2001-06-09 16:49:51 +00:00
|
|
|
|
2018-03-12 21:40:09 +00:00
|
|
|
SRCS= delay.c \
|
|
|
|
devicename.c \
|
|
|
|
devpath.c \
|
|
|
|
efi_console.c \
|
|
|
|
efi_driver_utils.c \
|
|
|
|
efichar.c \
|
2018-03-12 21:40:14 +00:00
|
|
|
efienv.c \
|
2019-06-24 23:18:42 +00:00
|
|
|
efihttp.c \
|
2018-03-12 21:40:09 +00:00
|
|
|
efinet.c \
|
|
|
|
efipart.c \
|
|
|
|
efizfs.c \
|
|
|
|
env.c \
|
|
|
|
errno.c \
|
|
|
|
handles.c \
|
|
|
|
libefi.c \
|
|
|
|
wchar.c
|
2016-06-04 08:47:45 +00:00
|
|
|
|
2019-09-05 22:15:50 +00:00
|
|
|
.PATH: ${SYSDIR}/teken
|
|
|
|
SRCS+= teken.c
|
|
|
|
|
2016-06-04 08:47:45 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
|
|
|
SRCS+= time.c
|
2020-07-06 18:19:42 +00:00
|
|
|
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
|
|
|
|
${MACHINE_CPUARCH} == "riscv"
|
2016-06-04 08:47:45 +00:00
|
|
|
SRCS+= time_event.c
|
|
|
|
.endif
|
2001-11-19 07:09:47 +00:00
|
|
|
|
2016-05-26 23:07:20 +00:00
|
|
|
# We implement a slightly non-standard %S in that it always takes a
|
|
|
|
# CHAR16 that's common in UEFI-land instead of a wchar_t. This only
|
|
|
|
# seems to matter on arm64 where wchar_t defaults to an int instead
|
|
|
|
# of a short. There's no good cast to use here so just ignore the
|
|
|
|
# warnings for now.
|
|
|
|
CWARNFLAGS.efinet.c+= -Wno-format
|
2017-02-07 15:16:01 +00:00
|
|
|
CWARNFLAGS.efipart.c+= -Wno-format
|
2017-02-03 16:39:10 +00:00
|
|
|
CWARNFLAGS.env.c+= -Wno-format
|
2016-05-26 23:07:20 +00:00
|
|
|
|
2015-05-05 11:00:50 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
2017-04-07 22:58:25 +00:00
|
|
|
CFLAGS+= -mgeneral-regs-only
|
2015-05-05 11:00:50 +00:00
|
|
|
.endif
|
2014-04-03 23:10:23 +00:00
|
|
|
.if ${MACHINE_ARCH} == "amd64"
|
2015-03-13 09:38:16 +00:00
|
|
|
CFLAGS+= -fPIC -mno-red-zone
|
2014-04-03 23:10:23 +00:00
|
|
|
.endif
|
2017-10-29 05:26:59 +00:00
|
|
|
CFLAGS+= -I${EFIINC}
|
|
|
|
CFLAGS+= -I${EFIINCMD}
|
2020-12-21 05:31:16 +00:00
|
|
|
CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
|
2021-01-11 21:54:23 +00:00
|
|
|
CFLAGS.efi_console.c+= -I${.CURDIR}/../loader
|
2019-09-05 22:15:50 +00:00
|
|
|
CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
|
2019-01-05 22:45:20 +00:00
|
|
|
.if ${MK_LOADER_ZFS} != "no"
|
2017-10-30 23:14:59 +00:00
|
|
|
CFLAGS+= -I${ZFSSRC}
|
2020-06-20 06:23:31 +00:00
|
|
|
CFLAGS+= -I${SYSDIR}/cddl/boot/zfs
|
|
|
|
CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/common
|
2017-08-04 04:20:06 +00:00
|
|
|
CFLAGS+= -DEFI_ZFS_BOOT
|
|
|
|
.endif
|
2001-06-09 16:49:51 +00:00
|
|
|
|
|
|
|
# Pick up the bootstrap header for some interface items
|
2017-10-29 05:26:59 +00:00
|
|
|
CFLAGS+= -I${LDRSRC}
|
2001-06-09 16:49:51 +00:00
|
|
|
|
2015-01-28 18:36:33 +00:00
|
|
|
# Handle FreeBSD specific %b and %D printf format specifiers
|
|
|
|
CFLAGS+= ${FORMAT_EXTENSIONS}
|
2016-07-19 19:00:22 +00:00
|
|
|
|
2019-11-02 09:50:36 +00:00
|
|
|
CFLAGS+= -DTERM_EMU
|
|
|
|
|
2001-06-09 16:49:51 +00:00
|
|
|
.include <bsd.lib.mk>
|