]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/efi/libefi/Makefile
MFC GELI Loader Improvements: r336252, r336254, r336256, r336354,
[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         efinet.c \
16         efipart.c \
17         efizfs.c \
18         env.c \
19         errno.c \
20         handles.c \
21         libefi.c \
22         wchar.c
23
24 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
25 SRCS+=  time.c
26 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
27 SRCS+=  time_event.c
28 .endif
29
30 # We implement a slightly non-standard %S in that it always takes a
31 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
32 # seems to matter on arm64 where wchar_t defaults to an int instead
33 # of a short. There's no good cast to use here so just ignore the
34 # warnings for now.
35 CWARNFLAGS.efinet.c+=   -Wno-format
36 CWARNFLAGS.efipart.c+=  -Wno-format
37 CWARNFLAGS.env.c+=      -Wno-format
38
39 .if ${MACHINE_CPUARCH} == "aarch64"
40 CFLAGS+=        -mgeneral-regs-only
41 .endif
42 .if ${MACHINE_ARCH} == "amd64"
43 CFLAGS+= -fPIC -mno-red-zone
44 .endif
45 CFLAGS+= -I${EFIINC}
46 CFLAGS+= -I${EFIINCMD}
47 .if ${MK_LOADER_ZFS} != "no"
48 CFLAGS+=        -I${ZFSSRC}
49 CFLAGS+=        -DEFI_ZFS_BOOT
50 .endif
51
52 # Pick up the bootstrap header for some interface items
53 CFLAGS+= -I${LDRSRC}
54
55 # Handle FreeBSD specific %b and %D printf format specifiers
56 CFLAGS+= ${FORMAT_EXTENSIONS}
57
58 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
59 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
60 CFLAGS+= -DTERM_EMU
61 .endif
62
63 .include <bsd.lib.mk>