Building Simulink S-Functions