]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/efi/libefi/Makefile
ldns: Upgrade to 1.8.3.
[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         eficom.c \
15         efienv.c \
16         efihttp.c \
17         efinet.c \
18         efipart.c \
19         efizfs.c \
20         env.c \
21         errno.c \
22         handles.c \
23         libefi.c \
24         wchar.c
25
26 .PATH:  ${SYSDIR}/teken
27 SRCS+=  teken.c
28
29 .if ${MACHINE_CPUARCH} == "amd64"
30 SRCS+=  time.c
31 .elif ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv"
32 SRCS+=  time_event.c
33 .elif ${MACHINE_CPUARCH} == "aarch64"
34 SRCS+=  time_arm64.c
35 .endif
36
37 # We implement a slightly non-standard %S in that it always takes a
38 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
39 # seems to matter on arm64 where wchar_t defaults to an int instead
40 # of a short. There's no good cast to use here so just ignore the
41 # warnings for now.
42 CWARNFLAGS.efinet.c+=   -Wno-format
43 CWARNFLAGS.efipart.c+=  -Wno-format
44 CWARNFLAGS.env.c+=      -Wno-format
45
46 .if ${MACHINE_CPUARCH} == "aarch64"
47 CFLAGS+=        -mgeneral-regs-only
48 .endif
49 .if ${MACHINE_ARCH} == "amd64"
50 CFLAGS+= -fPIC -mno-red-zone
51 .endif
52 CFLAGS+= -I${EFIINC}
53 CFLAGS+= -I${EFIINCMD}
54 CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
55 CFLAGS.efi_console.c+= -I${.CURDIR}/../loader
56 CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
57 .if ${MK_LOADER_ZFS} != "no"
58 CFLAGS+=        -I${ZFSSRC}
59 CFLAGS+=        -I${SYSDIR}/cddl/boot/zfs
60 CFLAGS+=        -I${SYSDIR}/cddl/contrib/opensolaris/uts/common
61 CFLAGS+=        -DEFI_ZFS_BOOT
62 .endif
63
64 # Pick up the bootstrap header for some interface items
65 CFLAGS+= -I${LDRSRC}
66
67 # Handle FreeBSD specific %b and %D printf format specifiers
68 CFLAGS+= ${FORMAT_EXTENSIONS}
69
70 CFLAGS+= -DTERM_EMU
71
72 .include "${BOOTSRC}/veriexec.mk"
73
74 .include <bsd.lib.mk>