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