I've managed to find a solution by including makecfg.m in my custom simulink library and utilizing the functions
- setTargetProvidesMain() and
- addSourceFiles() for including my rt_main.cpp implementation.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!