From 72bb39c0237f8bcc3afa8b623e8b097eec6d69cd Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 6 Oct 2014 15:39:48 -0700 Subject: Import upstream version 0.7 --- lib/Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/Makefile (limited to 'lib/Makefile') diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 00000000..adb03477 --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,29 @@ +TARGET = lib.a + +LIBFILES = simple_file.o guid.o console.o execute.o configtable.o shell.o variables.o security_policy.o + +ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) + +EFI_INCLUDE = /usr/include/efi +EFI_INCLUDES = -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol -I../include + +EFI_CRT_OBJS = $(EFI_PATH)/crt0-efi-$(ARCH).o +EFI_LDS = $(EFI_PATH)/elf_$(ARCH)_efi.lds + +CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \ + -fshort-wchar -Wall -mno-red-zone -DBUILD_EFI -fno-builtin \ + -Werror \ + $(EFI_INCLUDES) +ifeq ($(ARCH),x86_64) + CFLAGS += -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI +endif + +lib.a: $(LIBFILES) + ar rcs lib.a $(LIBFILES) + +all: $(TARGET) + +clean: + rm -f lib.a + rm -f $(LIBFILES) + -- cgit v1.2.3