#!/bin/sh set -eu NAME='siphash' CFLAGS='-O2' trap "rm -f tests/resources/impl.c src/impl.cmp.o tests/resources/impl.cmp.o" \ EXIT ( cd src/ gcc $CFLAGS -o impl.cmp.o -c impl.c strip impl.cmp.o ) & ( cd tests/resources/ sed 's/^int siphash(/int siphash_impl(/' < "$NAME".c > impl.c gcc $CFLAGS -o impl.cmp.o -c impl.c strip impl.cmp.o ) & wait cmp tests/resources/impl.cmp.o src/impl.cmp.o