xref: /freebsd/stand/efi/Makefile.inc (revision f8ca5d45c3c1829759ecd87cb95d53e5ab7d0811)
1# Options used when building app-specific efi components
2# See conf/kern.mk for the correct set of these
3CFLAGS+=	-Wformat
4LDFLAGS+=	-nostdlib
5
6.if ${MACHINE_CPUARCH} == "amd64"
7CFLAGS+=	-fshort-wchar
8CFLAGS+=	-mno-red-zone
9.endif
10
11.if ${MACHINE_CPUARCH} == "aarch64"
12CFLAGS+=	-fshort-wchar
13CFLAGS+=	-fPIC
14.endif
15
16.if ${MACHINE_CPUARCH} == "arm"
17CFLAGS+=	-fPIC
18.endif
19
20.if ${MACHINE_CPUARCH} == "amd64"
21.if ${DO32:U0} == 1
22EFI_TARGET=	efi-app-ia32
23.else
24EFI_TARGET=	efi-app-x86_64
25.endif
26.else
27EFI_TARGET=	binary
28.endif
29
30# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2024 00:00:00
31# for build reproducibility.
32SOURCE_DATE_EPOCH?=1704067200
33
34.include "../Makefile.inc"
35