diff options
| author | Matthew Garrett <mjg@redhat.com> | 2012-06-18 17:49:57 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2012-06-18 17:49:57 -0400 |
| commit | 9579a3633657f0adb26e975fca191e0a49474e82 (patch) | |
| tree | 2d5c048c92fabf912a95db35c54a50287794056e /Makefile | |
| parent | 661392464eee92684187e49812c63b9afed5675f (diff) | |
| download | efi-boot-shim-9579a3633657f0adb26e975fca191e0a49474e82.tar.gz efi-boot-shim-9579a3633657f0adb26e975fca191e0a49474e82.zip | |
Add crypto libraries
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -1,13 +1,15 @@ ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) +SUBDIRS = Cryptlib + LIB_PATH = /usr/lib64 EFI_INCLUDE = /usr/include/efi -EFI_INCLUDES = -nostdinc -I../Cryptlib -I../Cryptlib/Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol +EFI_INCLUDES = -nostdinc -ICryptlib -ICryptlib/Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol EFI_PATH = /usr/lib64/gnuefi LIB_GCC = $(shell $(CC) -print-libgcc-file-name) -EFI_LIBS = -lefi -lgnuefi --start-group ../Cryptlib/libcryptlib.a ../Cryptlib/OpenSSL/libopenssl.a --end-group $(LIB_GCC) +EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a --end-group $(LIB_GCC) EFI_CRT_OBJS = $(EFI_PATH)/crt0-efi-$(ARCH).o EFI_LDS = $(EFI_PATH)/elf_$(ARCH)_efi.lds @@ -19,23 +21,31 @@ CFLAGS = -O2 -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar \ ifeq ($(ARCH),x86_64) CFLAGS += -DEFI_FUNCTION_WRAPPER endif -LDFLAGS = -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIB_PATH) -L../Cryptlib -L../Cryptlib/OpenSSL $(EFI_CRT_OBJS) +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 +OBJS = shim.o shim.so -all: $(TARGET) +all: Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a $(TARGET) shim.efi: shim.so shim.so: $(OBJS) $(LD) -o $@ $(LDFLAGS) $^ $(EFI_LIBS) -%.efi: %.so +Cryptlib/libcryptlib.a: + $(MAKE) -C Cryptlib + +Cryptlib/OpenSSL/libopenssl.a: + $(MAKE) -C Cryptlib/OpenSSL + +%.efi: %.so objcopy -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel \ -j .rela -j .reloc \ --target=efi-app-$(ARCH) $^ $@ clean: + $(MAKE) -C Cryptlib clean + $(MAKE) -C Cryptlib/OpenSSL clean rm -f $(TARGET) $(OBJS) |
