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