2016-01-08 11:54:46 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# this script will reformat the wolfSSL source code to be compatible with
|
|
|
|
|
# an Arduino project
|
|
|
|
|
# run as bash ./wolfssl-arduino.sh
|
|
|
|
|
|
|
|
|
|
DIR=${PWD##*/}
|
|
|
|
|
|
2016-09-14 16:53:06 -06:00
|
|
|
if [ "$DIR" = "ARDUINO" ]; then
|
2016-01-08 11:54:46 -07:00
|
|
|
cp ../../src/*.c ../../
|
|
|
|
|
cp ../../wolfcrypt/src/*.c ../../
|
|
|
|
|
echo "/* stub header file for Arduino compatibility */" >> ../../wolfssl.h
|
|
|
|
|
else
|
|
|
|
|
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
|
|
|
|
|
fi
|
2017-04-19 11:53:58 -06:00
|
|
|
|
|
|
|
|
#UPDATED: 19 Apr 2017 to remove bio.c and evp.c from the root directory since
|
|
|
|
|
# they are included inline and should not be compiled directly
|
|
|
|
|
|
2017-04-19 13:10:55 -06:00
|
|
|
ARDUINO_DIR=${PWD}
|
2017-04-19 11:53:58 -06:00
|
|
|
cd ../../
|
|
|
|
|
rm bio.c
|
|
|
|
|
rm evp.c
|
2017-04-19 13:10:55 -06:00
|
|
|
cd $ARDUINO_DIR
|
|
|
|
|
# end script in the origin directory for any future functionality that may be added.
|
2017-04-19 11:53:58 -06:00
|
|
|
#End UPDATE: 19 Apr 2017
|