Files
earlephilhower_arduino-pico/tools/libbearssl/Makefile
T
Earle F. Philhower, III f6973fc64d Add RISC-V support, GCC 14 move (#2491)
* Adds RISC-V compilation option to the IDE and Platform.IO.
* Build RP2350-RISCV libpico, libbearssl
* Fix RP2350 BearSSL library (was copied from RP2040, now built for M33)
* New GCC 14.2 toolchain is required (12.4 RISC-V support is borked)
* Newlib locking fixed prototypes
* Manually force all runtime init code into RP2350 binaries
* Add RISC-V to CI
* Remove RP2350 BOOT2.S files, binaries (not used)
* Clean up minor GCC 14.x warnings
* Add RP2350-RISCV OTA build, link
* Add RISC-V FreeRTOS files (configuration still not running, but builds)
* Add basic documentation
2024-09-29 15:10:36 -07:00

46 lines
1.9 KiB
Makefile

VER_H=../../include/bearssl/bearssl_git.h
all T0 clean: bearssl/README.txt
PATH="$(PWD)/../../system/arm-none-eabi/bin/:$(PATH)" && arm-none-eabi-gcc --version && cd bearssl && $(MAKE) CONF=pico $@
install: all version-header
cp bearssl/pico/libbearssl.a ../../lib/rp2040/.
ar d ../../lib/rp2040/libbearssl.a `ar t ../../lib/rp2040/libbearssl.a | egrep 'x86|sse|pwr8|i62|m32|m62|m64|ct64|ctmul64'` # Remove unneeded objects
cp bearssl/inc/bearssl*.h ../../include/bearssl/.
all2: bearssl/README.txt
PATH="$(PWD)/../../system/arm-none-eabi/bin/:$(PATH)" && arm-none-eabi-gcc --version && cd bearssl && $(MAKE) CONF=pico2 clean all
install2: all2 version-header
cp bearssl/pico2/libbearssl.a ../../lib/rp2350/.
ar d ../../lib/rp2350/libbearssl.a `ar t ../../lib/rp2350/libbearssl.a | egrep 'x86|sse|pwr8|i62|m32|m62|m64|ct64|ctmul64'` # Remove unneeded objects
cp bearssl/inc/bearssl*.h ../../include/bearssl/.
all2rv: bearssl/README.txt
PATH="$(PWD)/../../system/riscv32-unknown-elf/bin/:$(PATH)" && riscv32-unknown-elf-gcc --version && cd bearssl && $(MAKE) CONF=pico2rv clean all
install2rv: all2rv version-header
cp bearssl/pico2rv/libbearssl.a ../../lib/rp2350-riscv/.
ar d ../../lib/rp2350-riscv/libbearssl.a `ar t ../../lib/rp2350-riscv/libbearssl.a | egrep 'x86|sse|pwr8|i62|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