
%Matlab m-file to build the mex64 dll library in debug mode
disp('executes matlab script to generate mex');
rootPath = evalin('base', 'rootPath');
display(rootPath);
clear mex;
currdir_ = pwd;
cd(rootPath);

system('copy "main\Smlk\lib_Sfn\+mkSfn\emC_rtwmakecfg.m$" "main\Smlk\libSmlk\mex\rtwmakecfg.m"');
  

clear mex;  %unload mex64 dll
system('mkdir main\\Smlk\\libSmlk\\mex');

  system('mkdir main\\Smlk\\libSmlk\\mex\tlc_c');
  system('copy "main\\Smlk\\libSfn_Ctrl\\+genSfn\\Ctrl\*.tlc" "main\\Smlk\\libSmlk\\mex\tlc_c\*.tlc"');


disp('mex step_WaveMngIx_FB_SfH.c to main/Smlk/libSmlk/mex'); 
 
  disp('-Imain/cpp/src_emC');
 
  disp('-Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH');
 
  disp('-Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit');



mex COMPFLAGS='$COMPFLAGS -TP -EHa' -outdir main/Smlk/libSmlk/mex/ ...
  -Lc:\Programs\MSC15_adaptSmlk\missingLibSDK8_10 ...
      -Imain/cpp/src_emC ...
      -Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH ...
      -Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit ...
    main/Smlk/libSfn_Ctrl/+genSfn/Ctrl/step_WaveMngIx_FB_SfH.c ...
      main/cpp/src_emC/emC/Ctrl/WaveMng_Ctrl_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ApplThrowOnFatalError_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExceptionPrintStacktrace_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExcThCxtStacksize.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ObjectJc_allocStartup_emC.c ...
      main/cpp/src_emC/emC/Base/Assert_emC.c ...
      main/cpp/src_emC/emC/Base/CheckStack_emC.c ...
      main/cpp/src_emC/emC/Base/DefPortTypes_emC.c ...
      main/cpp/src_emC/emC/Base/ExceptionCpp_emC.cpp ...
      main/cpp/src_emC/emC/Base/ExcThreadCxt_emC.c ...
      main/cpp/src_emC/emC/Base/MemC_emC.c ...
      main/cpp/src_emC/emC/Base/Memfree_ThreadAndBlockHeap.c ...
      main/cpp/src_emC/emC/Base/ObjectSimple_emC.c ...
      main/cpp/src_emC/emC/Base/ObjectRefl_emC.c ...
      main/cpp/src_emC/emC/Base/Time_emC.c ...
      main/cpp/src_emC/emC/Base/Timeconversions_emC.c ...
      main/cpp/src_emC/emC/Base/Reflection_emC.c ...
      main/cpp/src_emC/emC/Base/ReflectionBaseTypes_emC.c ...
      main/cpp/src_emC/emC/Base/StringBase_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_TimeMeas_emC.c ...
      main/cpp/src_emC/emC/Base/os_common.c ...
      main/cpp/src_emC/emC/OSAL/Environment_OSALemC.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows_Msc15/os_atomic.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_environment.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_file.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mutex.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sharedmem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sync.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_thread.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_time.c ...

disp('mex step_WaveMngCint_FB_SfH.c to main/Smlk/libSmlk/mex'); 
 
  disp('-Imain/cpp/src_emC');
 
  disp('-Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH');
 
  disp('-Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit');



mex COMPFLAGS='$COMPFLAGS -TP -EHa' -outdir main/Smlk/libSmlk/mex/ ...
  -Lc:\Programs\MSC15_adaptSmlk\missingLibSDK8_10 ...
      -Imain/cpp/src_emC ...
      -Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH ...
      -Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit ...
    main/Smlk/libSfn_Ctrl/+genSfn/Ctrl/step_WaveMngCint_FB_SfH.c ...
      main/cpp/src_emC/emC/Ctrl/WaveMng_Ctrl_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ApplThrowOnFatalError_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExceptionPrintStacktrace_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExcThCxtStacksize.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ObjectJc_allocStartup_emC.c ...
      main/cpp/src_emC/emC/Base/Assert_emC.c ...
      main/cpp/src_emC/emC/Base/CheckStack_emC.c ...
      main/cpp/src_emC/emC/Base/DefPortTypes_emC.c ...
      main/cpp/src_emC/emC/Base/ExceptionCpp_emC.cpp ...
      main/cpp/src_emC/emC/Base/ExcThreadCxt_emC.c ...
      main/cpp/src_emC/emC/Base/MemC_emC.c ...
      main/cpp/src_emC/emC/Base/Memfree_ThreadAndBlockHeap.c ...
      main/cpp/src_emC/emC/Base/ObjectSimple_emC.c ...
      main/cpp/src_emC/emC/Base/ObjectRefl_emC.c ...
      main/cpp/src_emC/emC/Base/Time_emC.c ...
      main/cpp/src_emC/emC/Base/Timeconversions_emC.c ...
      main/cpp/src_emC/emC/Base/Reflection_emC.c ...
      main/cpp/src_emC/emC/Base/ReflectionBaseTypes_emC.c ...
      main/cpp/src_emC/emC/Base/StringBase_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_TimeMeas_emC.c ...
      main/cpp/src_emC/emC/Base/os_common.c ...
      main/cpp/src_emC/emC/OSAL/Environment_OSALemC.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows_Msc15/os_atomic.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_environment.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_file.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mutex.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sharedmem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sync.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_thread.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_time.c ...

disp('mex step_WaveMng_FB_SfH.c to main/Smlk/libSmlk/mex'); 
 
  disp('-Imain/cpp/src_emC');
 
  disp('-Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH');
 
  disp('-Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit');



mex COMPFLAGS='$COMPFLAGS -TP -EHa' -outdir main/Smlk/libSmlk/mex/ ...
  -Lc:\Programs\MSC15_adaptSmlk\missingLibSDK8_10 ...
      -Imain/cpp/src_emC ...
      -Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH ...
      -Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit ...
    main/Smlk/libSfn_Ctrl/+genSfn/Ctrl/step_WaveMng_FB_SfH.c ...
      main/cpp/src_emC/emC/Ctrl/WaveMng_Ctrl_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ApplThrowOnFatalError_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExceptionPrintStacktrace_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExcThCxtStacksize.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ObjectJc_allocStartup_emC.c ...
      main/cpp/src_emC/emC/Base/Assert_emC.c ...
      main/cpp/src_emC/emC/Base/CheckStack_emC.c ...
      main/cpp/src_emC/emC/Base/DefPortTypes_emC.c ...
      main/cpp/src_emC/emC/Base/ExceptionCpp_emC.cpp ...
      main/cpp/src_emC/emC/Base/ExcThreadCxt_emC.c ...
      main/cpp/src_emC/emC/Base/MemC_emC.c ...
      main/cpp/src_emC/emC/Base/Memfree_ThreadAndBlockHeap.c ...
      main/cpp/src_emC/emC/Base/ObjectSimple_emC.c ...
      main/cpp/src_emC/emC/Base/ObjectRefl_emC.c ...
      main/cpp/src_emC/emC/Base/Time_emC.c ...
      main/cpp/src_emC/emC/Base/Timeconversions_emC.c ...
      main/cpp/src_emC/emC/Base/Reflection_emC.c ...
      main/cpp/src_emC/emC/Base/ReflectionBaseTypes_emC.c ...
      main/cpp/src_emC/emC/Base/StringBase_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_TimeMeas_emC.c ...
      main/cpp/src_emC/emC/Base/os_common.c ...
      main/cpp/src_emC/emC/OSAL/Environment_OSALemC.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows_Msc15/os_atomic.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_environment.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_file.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mutex.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sharedmem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sync.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_thread.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_time.c ...

disp('mex step_WaveData_FB_SfH.c to main/Smlk/libSmlk/mex'); 
 
  disp('-Imain/cpp/src_emC');
 
  disp('-Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH');
 
  disp('-Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit');



mex COMPFLAGS='$COMPFLAGS -TP -EHa' -outdir main/Smlk/libSmlk/mex/ ...
  -Lc:\Programs\MSC15_adaptSmlk\missingLibSDK8_10 ...
      -Imain/cpp/src_emC ...
      -Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH ...
      -Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit ...
    main/Smlk/libSfn_Ctrl/+genSfn/Ctrl/step_WaveData_FB_SfH.c ...
      main/cpp/src_emC/emC/Ctrl/WaveMng_Ctrl_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ApplThrowOnFatalError_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExceptionPrintStacktrace_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExcThCxtStacksize.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ObjectJc_allocStartup_emC.c ...
      main/cpp/src_emC/emC/Base/Assert_emC.c ...
      main/cpp/src_emC/emC/Base/CheckStack_emC.c ...
      main/cpp/src_emC/emC/Base/DefPortTypes_emC.c ...
      main/cpp/src_emC/emC/Base/ExceptionCpp_emC.cpp ...
      main/cpp/src_emC/emC/Base/ExcThreadCxt_emC.c ...
      main/cpp/src_emC/emC/Base/MemC_emC.c ...
      main/cpp/src_emC/emC/Base/Memfree_ThreadAndBlockHeap.c ...
      main/cpp/src_emC/emC/Base/ObjectSimple_emC.c ...
      main/cpp/src_emC/emC/Base/ObjectRefl_emC.c ...
      main/cpp/src_emC/emC/Base/Time_emC.c ...
      main/cpp/src_emC/emC/Base/Timeconversions_emC.c ...
      main/cpp/src_emC/emC/Base/Reflection_emC.c ...
      main/cpp/src_emC/emC/Base/ReflectionBaseTypes_emC.c ...
      main/cpp/src_emC/emC/Base/StringBase_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_TimeMeas_emC.c ...
      main/cpp/src_emC/emC/Base/os_common.c ...
      main/cpp/src_emC/emC/OSAL/Environment_OSALemC.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows_Msc15/os_atomic.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_environment.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_file.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mutex.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sharedmem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sync.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_thread.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_time.c ...

disp('mex getPastIx_WaveData_FB_SfOp.c to main/Smlk/libSmlk/mex'); 
 
  disp('-Imain/cpp/src_emC');
 
  disp('-Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH');
 
  disp('-Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit');



mex COMPFLAGS='$COMPFLAGS -TP -EHa' -outdir main/Smlk/libSmlk/mex/ ...
  -Lc:\Programs\MSC15_adaptSmlk\missingLibSDK8_10 ...
      -Imain/cpp/src_emC ...
      -Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH ...
      -Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit ...
    main/Smlk/libSfn_Ctrl/+genSfn/Ctrl/getPastIx_WaveData_FB_SfOp.c ...
      main/cpp/src_emC/emC/Ctrl/WaveMng_Ctrl_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ApplThrowOnFatalError_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExceptionPrintStacktrace_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExcThCxtStacksize.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ObjectJc_allocStartup_emC.c ...
      main/cpp/src_emC/emC/Base/Assert_emC.c ...
      main/cpp/src_emC/emC/Base/CheckStack_emC.c ...
      main/cpp/src_emC/emC/Base/DefPortTypes_emC.c ...
      main/cpp/src_emC/emC/Base/ExceptionCpp_emC.cpp ...
      main/cpp/src_emC/emC/Base/ExcThreadCxt_emC.c ...
      main/cpp/src_emC/emC/Base/MemC_emC.c ...
      main/cpp/src_emC/emC/Base/Memfree_ThreadAndBlockHeap.c ...
      main/cpp/src_emC/emC/Base/ObjectSimple_emC.c ...
      main/cpp/src_emC/emC/Base/ObjectRefl_emC.c ...
      main/cpp/src_emC/emC/Base/Time_emC.c ...
      main/cpp/src_emC/emC/Base/Timeconversions_emC.c ...
      main/cpp/src_emC/emC/Base/Reflection_emC.c ...
      main/cpp/src_emC/emC/Base/ReflectionBaseTypes_emC.c ...
      main/cpp/src_emC/emC/Base/StringBase_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_TimeMeas_emC.c ...
      main/cpp/src_emC/emC/Base/os_common.c ...
      main/cpp/src_emC/emC/OSAL/Environment_OSALemC.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows_Msc15/os_atomic.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_environment.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_file.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mutex.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sharedmem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sync.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_thread.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_time.c ...

disp('mex step_AvgWave_FB_SfH.c to main/Smlk/libSmlk/mex'); 
 
  disp('-Imain/cpp/src_emC');
 
  disp('-Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH');
 
  disp('-Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit');



mex COMPFLAGS='$COMPFLAGS -TP -EHa' -outdir main/Smlk/libSmlk/mex/ ...
  -Lc:\Programs\MSC15_adaptSmlk\missingLibSDK8_10 ...
      -Imain/cpp/src_emC ...
      -Imain/cpp/src_emC/emC_inclApplSpec/stdef_SmlkSfuncExcH ...
      -Imain/cpp/src_emC/emC_inclComplSpec/cc_SmlkSfunc_64bit ...
    main/Smlk/libSfn_Ctrl/+genSfn/Ctrl/step_AvgWave_FB_SfH.c ...
      main/cpp/src_emC/emC/Ctrl/WaveMng_Ctrl_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ApplThrowOnFatalError_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExceptionPrintStacktrace_emC.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ExcThCxtStacksize.c ...
      main/cpp/src_emC/emC_srcApplSpec/applConv/ObjectJc_allocStartup_emC.c ...
      main/cpp/src_emC/emC/Base/Assert_emC.c ...
      main/cpp/src_emC/emC/Base/CheckStack_emC.c ...
      main/cpp/src_emC/emC/Base/DefPortTypes_emC.c ...
      main/cpp/src_emC/emC/Base/ExceptionCpp_emC.cpp ...
      main/cpp/src_emC/emC/Base/ExcThreadCxt_emC.c ...
      main/cpp/src_emC/emC/Base/MemC_emC.c ...
      main/cpp/src_emC/emC/Base/Memfree_ThreadAndBlockHeap.c ...
      main/cpp/src_emC/emC/Base/ObjectSimple_emC.c ...
      main/cpp/src_emC/emC/Base/ObjectRefl_emC.c ...
      main/cpp/src_emC/emC/Base/Time_emC.c ...
      main/cpp/src_emC/emC/Base/Timeconversions_emC.c ...
      main/cpp/src_emC/emC/Base/Reflection_emC.c ...
      main/cpp/src_emC/emC/Base/ReflectionBaseTypes_emC.c ...
      main/cpp/src_emC/emC/Base/StringBase_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_emC.c ...
      main/cpp/src_emC/emC/Base/Handle_ptr64_TimeMeas_emC.c ...
      main/cpp/src_emC/emC/Base/os_common.c ...
      main/cpp/src_emC/emC/OSAL/Environment_OSALemC.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows_Msc15/os_atomic.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_environment.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_file.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_mutex.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sharedmem.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_sync.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_thread.c ...
      main/cpp/src_emC/emC_srcOSALspec/osal_Windows/os_time.c ...