]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/efi/libefi/Makefile
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,
[FreeBSD/FreeBSD.git] / stand / efi / libefi / Makefile
1 # $FreeBSD$
2
3 .include <bsd.init.mk>
4
5 LIB=    efi
6 WARNS?= 2
7
8 SRCS=   delay.c \
9         devicename.c \
10         devpath.c \
11         efi_console.c \
12         efi_driver_utils.c \
13         efichar.c \
14         efienv.c \
15         efihttp.c \
16         efinet.c \
17         efipart.c \
18         efizfs.c \
19         env.c \
20         errno.c \
21         handles.c \
22         libefi.c \
23         wchar.c
24
25 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
26 SRCS+=  time.c
27 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
28 SRCS+=  time_event.c
29 .endif
30
31 # We implement a slightly non-standard %S in that it always takes a
32 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
33 # seems to matter on arm64 where wchar_t defaults to an int instead
34 # of a short. There's no good cast to use here so just ignore the
35 # warnings for now.
36 CWARNFLAGS.efinet.c+=   -Wno-format
37 CWARNFLAGS.efipart.c+=  -Wno-format
38 CWARNFLAGS.env.c+=      -Wno-format
39
40 .if ${MACHINE_CPUARCH} == "aarch64"
41 CFLAGS+=        -mgeneral-regs-only
42 .endif
43 .if ${MACHINE_ARCH} == "amd64"
44 CFLAGS+= -fPIC -mno-red-zone
45 .endif
46 CFLAGS+= -I${EFIINC}
47 CFLAGS+= -I${EFIINCMD}
48 .if ${MK_LOADER_ZFS} != "no"
49 CFLAGS+=        -I${ZFSSRC}
50 CFLAGS+=        -DEFI_ZFS_BOOT
51 .endif
52
53 # Pick up the bootstrap header for some interface items
54 CFLAGS+= -I${LDRSRC}
55
56 # Handle FreeBSD specific %b and %D printf format specifiers
57 CFLAGS+= ${FORMAT_EXTENSIONS}
58
59 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
60 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
61 CFLAGS+= -DTERM_EMU
62 .endif
63
64 .include <bsd.lib.mk>