mirror of
				https://git.proxmox.com/git/efi-boot-shim
				synced 2025-10-31 12:44:31 +00:00 
			
		
		
		
	 138deeff23
			
		
	
	
		138deeff23
		
	
	
	
	
		
			
			I don't think the x86 binaries clang builds will actually work unless they just infer -maccumulate-outgoing-args from __attribute__((__ms_abi__), but it's nice to have the analyzer working. Signed-off-by: Peter Jones <pjones@redhat.com>
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| 
 | |
| EFI_INCLUDES	= -I$(TOPDIR)/Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol
 | |
| 
 | |
| CFLAGS		= -ggdb -O0 -I$(TOPDIR) -iquote $(TOPDIR) -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar \
 | |
| 		  -Wall $(EFI_INCLUDES) -std=gnu89 \
 | |
| 		  -ffreestanding -I$(shell $(CC) -print-file-name=include)
 | |
| 
 | |
| CLANG_BUGS	= $(if $(findstring gcc,$(CC)),-maccumulate-outgoing-args,)
 | |
| 
 | |
| ifeq ($(ARCH),x86_64)
 | |
| 	CFLAGS	+= -mno-mmx -mno-sse -mno-red-zone -nostdinc $(CLANG_BUGS) \
 | |
| 		   -m64 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI \
 | |
| 		   -DNO_BUILTIN_VA_FUNCS -DMDE_CPU_X64
 | |
| endif
 | |
| ifeq ($(ARCH),ia32)
 | |
| 	CFLAGS	+= -mno-mmx -mno-sse -mno-red-zone -nostdinc \
 | |
| 		   $(CLANG_BUGS) -m32 -DMDE_CPU_IA32
 | |
| endif
 | |
| ifeq ($(ARCH),aarch64)
 | |
| 	CFLAGS	+= -DMDE_CPU_AARCH64
 | |
| endif
 | |
| LDFLAGS		= -nostdlib -znocombreloc
 | |
| 
 | |
| TARGET		= libcryptlib.a
 | |
| OBJS		=   Hash/CryptMd4Null.o \
 | |
| 		    Hash/CryptMd5.o \
 | |
| 		    Hash/CryptSha1.o \
 | |
| 		    Hash/CryptSha256.o \
 | |
| 		    Hash/CryptSha512.o \
 | |
| 		    Hmac/CryptHmacMd5Null.o \
 | |
| 		    Hmac/CryptHmacSha1Null.o \
 | |
| 		    Hmac/CryptHmacSha256Null.o \
 | |
| 		    Cipher/CryptAesNull.o \
 | |
| 		    Cipher/CryptTdesNull.o \
 | |
| 		    Cipher/CryptArc4Null.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/CryptPemNull.o \
 | |
| 		    SysCall/CrtWrapper.o \
 | |
| 		    SysCall/TimerWrapper.o \
 | |
| 		    SysCall/BaseMemAllocation.o \
 | |
| 		    SysCall/BaseStrings.o \
 | |
| 		    SysCall/memset.o
 | |
| 
 | |
| all: $(TARGET)
 | |
| 
 | |
| libcryptlib.a: $(OBJS)
 | |
| 	ar rcs libcryptlib.a $(OBJS)
 | |
| clean:
 | |
| 	rm -f $(TARGET) $(OBJS)
 |