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