2001-06-09 12:49:51 -04:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
2016-10-25 10:01:13 -04:00
|
|
|
.include <src.opts.mk>
|
|
|
|
|
|
2016-10-25 13:31:57 -04:00
|
|
|
.if ${MK_FORTH} != "no"
|
2017-02-01 03:46:59 -05:00
|
|
|
CFLAGS+= -DBOOT_FORTH
|
2016-10-25 13:31:57 -04:00
|
|
|
.include "${.CURDIR}/../../Makefile.ficl"
|
|
|
|
|
.endif
|
|
|
|
|
|
2004-11-27 19:30:22 -05:00
|
|
|
LIB= efi
|
2004-10-24 11:33:08 -04:00
|
|
|
INTERNALLIB=
|
2016-01-11 21:17:39 -05:00
|
|
|
WARNS?= 2
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2017-02-01 03:46:59 -05:00
|
|
|
SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
|
|
|
|
|
handles.c wchar.c libefi.c
|
2016-06-04 04:47:45 -04: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 02:09:47 -05:00
|
|
|
|
2016-05-26 19:07:20 -04: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 10:16:01 -05:00
|
|
|
CWARNFLAGS.efipart.c+= -Wno-format
|
2017-02-03 11:39:10 -05:00
|
|
|
CWARNFLAGS.env.c+= -Wno-format
|
2016-05-26 19:07:20 -04:00
|
|
|
|
2015-05-05 07:00:50 -04:00
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
2017-04-07 18:58:25 -04:00
|
|
|
CFLAGS+= -mgeneral-regs-only
|
2015-05-05 07:00:50 -04:00
|
|
|
.endif
|
2014-04-03 19:10:23 -04:00
|
|
|
.if ${MACHINE_ARCH} == "amd64"
|
2015-03-13 05:38:16 -04:00
|
|
|
CFLAGS+= -fPIC -mno-red-zone
|
2014-04-03 19:10:23 -04:00
|
|
|
.endif
|
2004-11-27 19:30:22 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../include
|
2015-04-14 06:40:37 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
|
2004-11-27 19:30:22 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
2001-06-09 12:49:51 -04:00
|
|
|
|
|
|
|
|
# Pick up the bootstrap header for some interface items
|
2004-11-27 19:30:22 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2015-01-28 13:36:33 -05:00
|
|
|
# Handle FreeBSD specific %b and %D printf format specifiers
|
|
|
|
|
CFLAGS+= ${FORMAT_EXTENSIONS}
|
2016-07-19 15:00:22 -04: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 10:38:39 -05:00
|
|
|
CFLAGS+= -DTERM_EMU
|
2016-07-19 15:00:22 -04:00
|
|
|
.endif
|
2014-07-22 00:37:47 -04:00
|
|
|
|
2001-06-09 12:49:51 -04:00
|
|
|
.include <bsd.lib.mk>
|