Skip to content
Snippets Groups Projects
Commit 7925cc0d authored by sebastien's avatar sebastien
Browse files

preprocessor: fixed USE_DLL under Linux and add a provision for MacOS (need to be tested)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3226 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 0cda8d64
No related branches found
No related tags found
No related merge requests found
...@@ -320,7 +320,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all ...@@ -320,7 +320,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
#else #else
mOutputFile << " eval('mex -O LDFLAGS=\"-pthread -shared -Wl,--no-undefined\" " << basename << "_dynamic.c')" << endl; // MATLAB/Linux|Mac # ifdef __linux__
mOutputFile << " eval('mex -O LDFLAGS=''-pthread -shared -Wl,--no-undefined'' " << basename << "_dynamic.c')" << endl; // MATLAB/Linux
# else // MacOS
mOutputFile << " eval('mex -O LDFLAGS=''-Wl,-twolevel_namespace -undefined error -arch \\$ARCHS -Wl,-syslibroot,\\$SDKROOT -mmacosx-version-min=\\$MACOSX_DEPLOYMENT_TARGET -bundle'' " << basename << "_dynamic.c')" << endl; // MATLAB/MacOS
# endif
#endif #endif
mOutputFile << "else" << endl mOutputFile << "else" << endl
<< " mex " << basename << "_dynamic.c" << endl // Octave << " mex " << basename << "_dynamic.c" << endl // Octave
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment