summaryrefslogtreecommitdiff
path: root/Cryptlib/Makefile
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <cyphermox@ubuntu.com>2017-08-04 12:10:50 -0400
committerMathieu Trudel-Lapierre <cyphermox@ubuntu.com>2017-08-04 12:10:50 -0400
commitbbfd2ab18f52600aa41f061b2da9a2afe2a9d6ac (patch)
tree56132d617fff7c4f05e67024ec872d88fcafa92d /Cryptlib/Makefile
downloadefi-boot-shim-upstream/0.9+1474479173.6c180c6.tar.gz
efi-boot-shim-upstream/0.9+1474479173.6c180c6.zip
Import Upstream version 0.9+1474479173.6c180c6upstream/0.9+1474479173.6c180c6
Diffstat (limited to 'Cryptlib/Makefile')
-rw-r--r--Cryptlib/Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/Cryptlib/Makefile b/Cryptlib/Makefile
new file mode 100644
index 00000000..a028979e
--- /dev/null
+++ b/Cryptlib/Makefile
@@ -0,0 +1,53 @@
+
+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) -std=gnu89 \
+ -ffreestanding -I$(shell $(CC) -print-file-name=include)
+
+ifeq ($(ARCH),x86_64)
+ CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args \
+ -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -DNO_BUILTIN_VA_FUNCS \
+ -DMDE_CPU_IA64
+endif
+ifeq ($(ARCH),ia32)
+ CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 \
+ -DMDE_CPU_IA32
+endif
+ifeq ($(ARCH),aarch64)
+ CFLAGS += -DMDE_CPU_AARCH64
+endif
+LDFLAGS = -nostdlib -znocombreloc
+
+TARGET = libcryptlib.a
+OBJS = Hash/CryptMd4.o \
+ Hash/CryptMd5.o \
+ Hash/CryptSha1.o \
+ Hash/CryptSha256.o \
+ Hash/CryptSha512.o \
+ Hmac/CryptHmacMd5.o \
+ Hmac/CryptHmacSha1.o \
+ Cipher/CryptAes.o \
+ Cipher/CryptTdes.o \
+ Cipher/CryptArc4.o \
+ Rand/CryptRand.o \
+ Pk/CryptRsaBasic.o \
+ Pk/CryptRsaExtNull.o \
+ Pk/CryptPkcs7SignNull.o \
+ Pk/CryptPkcs7Verify.o \
+ Pk/CryptDhNull.o \
+ Pk/CryptTs.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)