diff options
| author | Peter Jones <pjones@redhat.com> | 2012-08-13 17:06:46 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2012-09-06 12:13:44 -0400 |
| commit | 178b5681b89cbaf59b69ba341e4cabb061bf8281 (patch) | |
| tree | 2735585ed9b064b388962a405f594449c26bc875 /Makefile | |
| parent | 2295594a4721ad5d6e443af950505f4f694e5905 (diff) | |
| download | efi-boot-shim-178b5681b89cbaf59b69ba341e4cabb061bf8281.tar.gz efi-boot-shim-178b5681b89cbaf59b69ba341e4cabb061bf8281.zip | |
Allow specification of vendor_cert through a build command line option.
This allows you to specify the vendor_cert as a file on the command line
during build.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -14,24 +14,30 @@ EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/ 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 \ $(EFI_INCLUDES) ifeq ($(ARCH),x86_64) CFLAGS += -DEFI_FUNCTION_WRAPPER endif +ifneq ($(origin VENDOR_CERT_FILE), undefined) + CFLAGS += -DVENDOR_CERT_FILE=\"$(VENDOR_CERT_FILE)\" +endif + LDFLAGS = -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIB_PATH) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) -TARGET = shim.efi -OBJS = shim.o shim.so -SOURCES = shim.c shim.h signature.h PeImage.h cert.h +TARGET = shim.efi +OBJS = shim.o cert.o +SOURCES = shim.c shim.h signature.h PeImage.h all: $(TARGET) shim.o: $(SOURCES) -shim.so: $(OBJS) Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a +cert.o : cert.S + $(CC) $(CFLAGS) -c -o $@ $< + +shim.so: $(OBJS) Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a cert.o $(LD) -o $@ $(LDFLAGS) $^ $(EFI_LIBS) Cryptlib/libcryptlib.a: |
