The MATLAB script does not require compilation. Simply make sure that $RSFROOT/lib is in MATLABPATH and LD_LIBRARY_PATH.