efi-boot-shim/Cryptlib/Makefile
Ard Biesheuvel f7a182154e Factor out x86-isms and add cross compile support
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>
2014-08-12 10:54:05 -04:00

49 lines
1.3 KiB
Makefile

EFI_INCLUDES = -IInclude -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol
CFLAGS = -ggdb -O0 -I. -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar \
-Wall $(EFI_INCLUDES)
ifeq ($(ARCH),x86_64)
CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args \
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI
endif
ifeq ($(ARCH),ia32)
CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32
endif
LDFLAGS = -nostdlib -znocombreloc
TARGET = libcryptlib.a
OBJS = Hash/CryptMd4.o \
Hash/CryptMd5.o \
Hash/CryptSha1.o \
Hash/CryptSha256.o \
Hmac/CryptHmacMd5.o \
Hmac/CryptHmacSha1.o \
Cipher/CryptAes.o \
Cipher/CryptTdes.o \
Cipher/CryptArc4.o \
Rand/CryptRand.o \
Pk/CryptRsaBasic.o \
Pk/CryptRsaExt.o \
Pk/CryptRsaExtNull.o \
Pk/CryptPkcs7Sign.o \
Pk/CryptPkcs7SignNull.o \
Pk/CryptPkcs7Verify.o \
Pk/CryptPkcs7VerifyNull.o \
Pk/CryptDh.o \
Pk/CryptX509.o \
Pk/CryptAuthenticode.o \
Pem/CryptPem.o \
SysCall/CrtWrapper.o \
SysCall/TimerWrapper.o \
SysCall/BaseMemAllocation.o \
SysCall/BaseStrings.o
all: $(TARGET)
libcryptlib.a: $(OBJS)
ar rcs libcryptlib.a $(OBJS)
clean:
rm -f $(TARGET) $(OBJS)