mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-02 08:20:48 +00:00

This patch cleans up and refactors the Makefiles to better allow new architectures to be added: - remove unused Makefile definitions - import Makefile definitions from top level rather than redefining - move x86 specific CFLAGS to inside ifeq() blocks - remove x86 inline asm - allow $(FORMAT) to be overridden: this is necessary as there exists no EFI or PE/COFF aware objcopy for ARM Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
27 lines
651 B
Makefile
27 lines
651 B
Makefile
TARGET = lib.a
|
|
|
|
LIBFILES = simple_file.o guid.o console.o execute.o configtable.o shell.o variables.o security_policy.o
|
|
|
|
EFI_INCLUDES = -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol -I../include
|
|
|
|
CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \
|
|
-fshort-wchar -Wall -DBUILD_EFI -fno-builtin -Werror \
|
|
$(EFI_INCLUDES)
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
CFLAGS += -mno-red-zone -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI
|
|
endif
|
|
ifeq ($(ARCH),ia32)
|
|
CFLAGS += -mno-red-zone -m32
|
|
endif
|
|
|
|
lib.a: $(LIBFILES)
|
|
ar rcs lib.a $(LIBFILES)
|
|
|
|
all: $(TARGET)
|
|
|
|
clean:
|
|
rm -f lib.a
|
|
rm -f $(LIBFILES)
|
|
|