Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/random/build.sh
Show All 22 Lines | |||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Basic script to build crude unit tests. | # Basic script to build crude unit tests. | ||||
# | # | ||||
# Diff-reduction checking between Yarrow and fortuna is done like so: | # Diff-reduction checking between fortuna and the other algorithm is done like so: | ||||
# | # | ||||
# $ diff -u -B <(sed -e 's/yarrow/wombat/g' \ | # $ diff -u -B <(sed -e 's/random_other/random_wombat/g' \ | ||||
# -e 's/YARROW/WOMBAT/g' yarrow.c) \ | # -e 's/RANDOM_OTHER/RANDOM_WOMBAT/g' other_algorithm.c) \ | ||||
# <(sed -e 's/fortuna/wombat/g' \ | # <(sed -e 's/random_fortuna/random_wombat/g' \ | ||||
# -e 's/FORTUNA/WOMBAT/g' fortuna.c) | less | # -e 's/RANDOM_FORTUNA/RANDOM_WOMBAT/g' fortuna.c) | less | ||||
# | # | ||||
cc -g -O0 -pthread \ | cc -g -O0 -pthread \ | ||||
-I../.. -lstdthreads -Wall \ | -I../.. -lstdthreads -Wall \ | ||||
unit_test.c \ | unit_test.c \ | ||||
yarrow.c \ | other_algorithm.c \ | ||||
hash.c \ | hash.c \ | ||||
../../crypto/rijndael/rijndael-api-fst.c \ | ../../crypto/rijndael/rijndael-api-fst.c \ | ||||
../../crypto/rijndael/rijndael-alg-fst.c \ | ../../crypto/rijndael/rijndael-alg-fst.c \ | ||||
../../crypto/sha2/sha256c.c \ | ../../crypto/sha2/sha256c.c \ | ||||
-lz \ | -lz \ | ||||
-o yunit_test | -o other_unit_test | ||||
cc -g -O0 -pthread \ | cc -g -O0 -pthread \ | ||||
-I../.. -lstdthreads -Wall \ | -I../.. -lstdthreads -Wall \ | ||||
unit_test.c \ | unit_test.c \ | ||||
fortuna.c \ | fortuna.c \ | ||||
hash.c \ | hash.c \ | ||||
../../crypto/rijndael/rijndael-api-fst.c \ | ../../crypto/rijndael/rijndael-api-fst.c \ | ||||
../../crypto/rijndael/rijndael-alg-fst.c \ | ../../crypto/rijndael/rijndael-alg-fst.c \ | ||||
../../crypto/sha2/sha256c.c \ | ../../crypto/sha2/sha256c.c \ | ||||
-lz \ | -lz \ | ||||
-o funit_test | -o fortuna_unit_test |