]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/efi/libefi/Makefile
bhyvectl(8): Normalize the man page date
[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 .PATH:  ${SYSDIR}/teken
26 SRCS+=  teken.c
27
28 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
29 SRCS+=  time.c
30 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
31     ${MACHINE_CPUARCH} == "riscv"
32 SRCS+=  time_event.c
33 .endif
34
35 # We implement a slightly non-standard %S in that it always takes a
36 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
37 # seems to matter on arm64 where wchar_t defaults to an int instead
38 # of a short. There's no good cast to use here so just ignore the
39 # warnings for now.
40 CWARNFLAGS.efinet.c+=   -Wno-format
41 CWARNFLAGS.efipart.c+=  -Wno-format
42 CWARNFLAGS.env.c+=      -Wno-format
43
44 .if ${MACHINE_CPUARCH} == "aarch64"
45 CFLAGS+=        -mgeneral-regs-only
46 .endif
47 .if ${MACHINE_ARCH} == "amd64"
48 CFLAGS+= -fPIC -mno-red-zone
49 .endif
50 CFLAGS+= -I${EFIINC}
51 CFLAGS+= -I${EFIINCMD}
52 CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken
53 CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
54 .if ${MK_LOADER_ZFS} != "no"
55 CFLAGS+=        -I${ZFSSRC}
56 CFLAGS+=        -I${SYSDIR}/cddl/boot/zfs
57 CFLAGS+=        -I${SYSDIR}/cddl/contrib/opensolaris/uts/common
58 CFLAGS+=        -DEFI_ZFS_BOOT
59 .endif
60
61 # Pick up the bootstrap header for some interface items
62 CFLAGS+= -I${LDRSRC}
63
64 # Handle FreeBSD specific %b and %D printf format specifiers
65 CFLAGS+= ${FORMAT_EXTENSIONS}
66
67 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
68 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
69 CFLAGS+= -DTERM_EMU
70 .endif
71
72 .include <bsd.lib.mk>