forked from puzzleos/stubby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.conf
45 lines (38 loc) · 1.39 KB
/
make.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# stubby build configuration
#
# Copyright (c) 2020 Cisco Systems, Inc. <[email protected]>
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
ARCH ?= $(shell uname -m | sed s,i[3456789]86,ia32,)
EFIINC ?= /usr/include/efi
EFIINCS = -I${EFIINC} -I${EFIINC}/${ARCH} -I${EFIINC}/protocol
LIB ?= /usr/lib
EFILIB ?= ${LIB}
EFI_CRT_OBJS = ${EFILIB}/crt0-efi-${ARCH}.o
EFI_LDS = ${EFILIB}/elf_${ARCH}_efi.lds
CFLAGS = \
-Wall -Werror \
${EFIINCS} -fno-stack-protector -fpic -fshort-wchar -mno-red-zone \
-DGIT_VERSION=\"$(shell git rev-parse HEAD | cut -c1-12)\"
ifeq (${ARCH},x86_64)
CFLAGS += -DEFI_FUNCTION_WRAPPER
endif
LDFLAGS = \
-shared \
-nostdlib -znocombreloc -T ${EFI_LDS} -Bsymbolic \
-L ${EFILIB} -L ${LIB} ${EFI_CRT_OBJS}
# kate: syntax Makefile;