Commit 7925cc0d authored by sebastien's avatar sebastien

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
......@@ -320,7 +320,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all
exit(EXIT_FAILURE);
}
#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
mOutputFile << "else" << endl
<< " mex " << basename << "_dynamic.c" << endl // Octave
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment