]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/efi/libefi/Makefile
Checkpoint initial integration work
[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 # We implement a slightly non-standard %S in that it always takes a
17 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
18 # seems to matter on arm64 where wchar_t defaults to an int instead
19 # of a short. There's no good cast to use here so just ignore the
20 # warnings for now.
21 CWARNFLAGS.efinet.c+=   -Wno-format
22
23 .if ${MACHINE_CPUARCH} == "aarch64"
24 CFLAGS+=        -msoft-float -mgeneral-regs-only
25 .endif
26 .if ${MACHINE_ARCH} == "amd64"
27 CFLAGS+= -fPIC -mno-red-zone
28 .endif
29 CFLAGS+= -I${.CURDIR}/../include
30 CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
31 CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
32
33 # Pick up the bootstrap header for some interface items
34 CFLAGS+= -I${.CURDIR}/../../common
35
36 # Handle FreeBSD specific %b and %D printf format specifiers
37 CFLAGS+= ${FORMAT_EXTENSIONS}
38
39 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
40 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
41 CFLAGS+= -DTERM_EMU
42 .endif
43
44 .include <bsd.lib.mk>