mirror of
				https://github.com/esp8266/Arduino.git
				synced 2025-10-31 15:50:55 +03:00 
			
		
		
		
	Rewrite all the integer math operations with const input parameters to use PROGMEM properly (pgm_read_xx or memcpy_P), and move all the EC order and generators and SHA OIDs to PROGMEM. This frees around 1.2KB of heap for any SSL applications. Also delete unneeded objects from the bearssl.a library to shrink the GIT repo size.
		
			
				
	
	
		
			30 lines
		
	
	
		
			959 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			959 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| 
 | |
| 
 | |
| VER_H=../include/bearssl/bearssl_git.h
 | |
| 
 | |
| all T0 clean: bearssl/README.txt
 | |
| 	PATH="$(PATH):$(PWD)/../../xtensa-lx106-elf/bin/" && cd bearssl && make CONF=esp8266 $@
 | |
| 
 | |
| install: all version-header
 | |
| 	cp bearssl/esp8266/libbearssl.a ../lib/.
 | |
| 	ar d ../lib/libbearssl.a `ar t ../lib/libbearssl.a | egrep 'i31|i32|x86|sse|pwr8|i62|m31|m32|m62|m64|ct64|ctmul64'` # Remove unneeded objects
 | |
| 	cp bearssl/inc/bearssl*.h ../include/bearssl/.
 | |
| 
 | |
| bearssl/README.txt:
 | |
| 	git submodule update --init --recursive bearssl
 | |
| 	cd bearssl && (git remote add bearssl https://www.bearssl.org/git/BearSSL || true)
 | |
| 
 | |
| merge-upstream:
 | |
| 	cd bearssl && git pull bearssl master
 | |
| 
 | |
| version-header:
 | |
| 	echo "// Do not edit -- Automatically generated by tools/sdk/ssl/bearssl/Makefile" > $(VER_H)
 | |
| 	echo -n "#define BEARSSL_GIT " >> $(VER_H)
 | |
| 	cd bearssl && git rev-parse --short HEAD >> ../$(VER_H)
 | |
| 
 | |
| native: bearssl/README.txt
 | |
| 	cd bearssl && make
 | |
| 
 | |
| native32: bearssl/README.txt
 | |
| 	cd bearssl && make CONF=Unix32
 |