]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/efi/libefi/Makefile
MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042,
[FreeBSD/FreeBSD.git] / sys / boot / efi / libefi / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4
5 .if ${MK_FORTH} != "no"
6 CFLAGS+= -DBOOT_FORTH
7 .include "${.CURDIR}/../../Makefile.ficl"
8 .endif
9
10 LIB=    efi
11 INTERNALLIB=
12 WARNS?= 2
13
14 SRCS=   delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
15         handles.c wchar.c libefi.c
16
17 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
18 SRCS+=  time.c
19 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
20 SRCS+=  time_event.c
21 .endif
22
23 # We implement a slightly non-standard %S in that it always takes a
24 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
25 # seems to matter on arm64 where wchar_t defaults to an int instead
26 # of a short. There's no good cast to use here so just ignore the
27 # warnings for now.
28 CWARNFLAGS.efinet.c+=   -Wno-format
29 CWARNFLAGS.efipart.c+=  -Wno-format
30 CWARNFLAGS.env.c+=      -Wno-format
31
32 .if ${MACHINE_CPUARCH} == "aarch64"
33 CFLAGS+=        -msoft-float -mgeneral-regs-only
34 .endif
35 .if ${MACHINE_ARCH} == "amd64"
36 CFLAGS+= -fPIC -mno-red-zone
37 .endif
38 CFLAGS+= -I${.CURDIR}/../include
39 CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
40 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
41
42 # Pick up the bootstrap header for some interface items
43 CFLAGS+= -I${.CURDIR}/../../common
44
45 # Handle FreeBSD specific %b and %D printf format specifiers
46 CFLAGS+= ${FORMAT_EXTENSIONS}
47
48 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
49 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
50 CFLAGS+= -DTERM_EMU
51 .endif
52
53 .include <bsd.lib.mk>