#!/bin/sh

if [ gprofhelper.c -nt gprofhelper.so ] ; then 
    echo "Recompiling gprof helper ..."
    gcc -shared -nostdlib -fPIC gprofhelper.c -o gprofhelper.so -lpthread -ldl || exit 1
fi

. ardev_common.sh
LDPRELOAD=./gprofhelper.so $EXECUTABLE "$@"
