]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/efi/libefi/Makefile
MFV: zlib: examples: define functions as static ones. (PR #855)
[FreeBSD/FreeBSD.git] / stand / efi / libefi / Makefile
1
2 .include <bsd.init.mk>
3
4 LIB=    efi
5 WARNS?= 2
6
7 SRCS=   delay.c \
8         devicename.c \
9         devpath.c \
10         efi_console.c \
11         efi_driver_utils.c \
12         efichar.c \
13         eficom.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"
29 SRCS+=  time.c
30 .elif ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv"
31 SRCS+=  time_event.c
32 .elif ${MACHINE_CPUARCH} == "aarch64"
33 SRCS+=  time_arm64.c
34 .endif
35
36 # We implement a slightly non-standard %S in that it always takes a
37 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
38 # seems to matter on arm64 where wchar_t defaults to an int instead
39 # of a short. There's no good cast to use here so just ignore the
40 # warnings for now.
41 CWARNFLAGS.efinet.c+=   -Wno-format
42 CWARNFLAGS.efipart.c+=  -Wno-format
43 CWARNFLAGS.env.c+=      -Wno-format
44
45 .if ${MACHINE_CPUARCH} == "aarch64"
46 CFLAGS+=        -mgeneral-regs-only
47 .endif
48 .if ${MACHINE_ARCH} == "amd64"
49 CFLAGS+= -fPIC -mno-red-zone
50 .endif
51 CFLAGS+= -I${EFIINC}
52 CFLAGS+= -I${EFIINCMD}
53 CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
54 CFLAGS.efi_console.c+= -I${.CURDIR}/../loader
55 CFLAGS.teken.c+= -I${SRCTOP}/sys/teken
56 .if ${MK_LOADER_ZFS} != "no"
57 CFLAGS+=        -I${ZFSSRC}
58 CFLAGS+=        -I${SYSDIR}/cddl/boot/zfs
59 CFLAGS+=        -I${SYSDIR}/cddl/contrib/opensolaris/uts/common
60 CFLAGS+=        -DEFI_ZFS_BOOT
61 .endif
62
63 # Pick up the bootstrap header for some interface items
64 CFLAGS+= -I${LDRSRC}
65
66 # Handle FreeBSD specific %b and %D printf format specifiers
67 CFLAGS+= ${FORMAT_EXTENSIONS}
68
69 CFLAGS+= -DTERM_EMU
70
71 .include "${BOOTSRC}/veriexec.mk"
72
73 .include <bsd.lib.mk>