2001-06-09 16:49:51 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2016-10-25 14:01:13 +00:00
|
|
|
.include <src.opts.mk>
|
|
|
|
|
2016-10-25 17:31:57 +00:00
|
|
|
.if ${MK_FORTH} != "no"
|
2017-02-01 08:46:59 +00:00
|
|
|
CFLAGS+= -DBOOT_FORTH
|
2016-10-25 17:31:57 +00:00
|
|
|
.include "${.CURDIR}/../../Makefile.ficl"
|
|
|
|
.endif
|
|
|
|
|
2004-11-28 00:30:22 +00:00
|
|
|
LIB= efi
|
2004-10-24 15:33:08 +00:00
|
|
|
INTERNALLIB=
|
2016-01-12 02:17:39 +00:00
|
|
|
WARNS?= 2
|
2001-06-09 16:49:51 +00:00
|
|
|
|
2017-02-01 08:46:59 +00:00
|
|
|
SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
|
2017-08-04 04:16:41 +00:00
|
|
|
handles.c wchar.c libefi.c efi_driver_utils.c
|
2016-06-04 08:47:45 +00:00
|
|
|
|
|
|
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
|
|
|
SRCS+= time.c
|
|
|
|
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
|
|
|
|
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
|
2004-11-28 00:30:22 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../include
|
2015-04-14 10:40:37 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
|
2004-11-28 00:30:22 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
2001-06-09 16:49:51 +00:00
|
|
|
|
|
|
|
# Pick up the bootstrap header for some interface items
|
2004-11-28 00:30:22 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
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
|
|
|
|
|
|
|
# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
|
|
|
|
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
|
2016-01-06 15:38:39 +00:00
|
|
|
CFLAGS+= -DTERM_EMU
|
2016-07-19 19:00:22 +00:00
|
|
|
.endif
|
2014-07-22 04:37:47 +00:00
|
|
|
|
2001-06-09 16:49:51 +00:00
|
|
|
.include <bsd.lib.mk>
|