Skip to content

Commit

Permalink
- get rid of rml_prim_once in Compiler/runtime/SimulationResults_rml.c
Browse files Browse the repository at this point in the history
- add $CFLAGS a bit later so people can use it to link libraries via MODELICAUSERCFLAGS in
  Compiler/susan_codegen/SimCode/SimCodeC.tpl
- removed old comment from Compiler/runtime/System_rml.c


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7213 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 26, 2010
1 parent 858bba6 commit 8bb6677
Show file tree
Hide file tree
Showing 6 changed files with 2,260 additions and 2,247 deletions.
7 changes: 7 additions & 0 deletions Compiler/SimCode.mo
Expand Up @@ -7300,6 +7300,13 @@ algorithm
true = "Windows_NT" ==& System.os();
then {"-llapack-mingw", "-ltmglib-mingw", "-lblas-mingw", "-lf2c"};

// omcruntime on windows needs linking with mico2313 and wsock!
case Absyn.STRING(str as "omcruntime")
equation
true = "Windows_NT" ==& System.os();
str = "-l" +& str;
then {str, "-lmico2313", "-lws2_32"};

// The library is not actually named libLapack.so.
// Which is a problem, since MSL says it does.
case Absyn.STRING("Lapack") then {"-llapack"};
Expand Down
17 changes: 11 additions & 6 deletions Compiler/SimCodeC.mo
Expand Up @@ -9221,7 +9221,10 @@ algorithm
}, true));
out_txt := functionBodies(out_txt, a_functions);
out_txt := Tpl.softNewLine(out_txt);
out_txt := Tpl.writeTok(out_txt, Tpl.ST_STRING("}"));
out_txt := Tpl.writeTok(out_txt, Tpl.ST_STRING_LIST({
"}\n",
"\n"
}, true));
end simulationFunctionsFile;

protected function lm_229
Expand Down Expand Up @@ -9278,6 +9281,8 @@ algorithm
out_txt := Tpl.pushIter(out_txt, Tpl.ITER_OPTIONS(0, NONE(), SOME(Tpl.ST_NEW_LINE()), 0, 0, Tpl.ST_NEW_LINE(), 0, Tpl.ST_NEW_LINE()));
out_txt := lm_229(out_txt, a_recordDecls);
out_txt := Tpl.popIter(out_txt);
out_txt := Tpl.softNewLine(out_txt);
out_txt := Tpl.writeTok(out_txt, Tpl.ST_NEW_LINE());
end recordsFile;

protected function lm_231
Expand Down Expand Up @@ -9555,7 +9560,7 @@ algorithm
txt = Tpl.writeStr(txt, i_fileNamePrefix);
txt = Tpl.writeTok(txt, Tpl.ST_LINE("_records.c\n"));
txt = Tpl.writeTok(txt, Tpl.ST_STRING("\t"));
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(CXX) $(CFLAGS) -I. -o "));
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(CXX) -I. -o "));
txt = Tpl.writeStr(txt, i_fileNamePrefix);
txt = Tpl.writeTok(txt, Tpl.ST_STRING("$(EXEEXT) "));
txt = Tpl.writeStr(txt, i_fileNamePrefix);
Expand All @@ -9565,9 +9570,9 @@ algorithm
txt = Tpl.writeText(txt, l_dirExtra);
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" "));
txt = Tpl.writeText(txt, l_libsPos1);
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" -lsim $(LDFLAGS) -lf2c -linteractive $(SENDDATALIBS) "));
txt = Tpl.writeText(txt, l_libsPos2);
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" "));
txt = Tpl.writeText(txt, l_libsPos2);
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" -lsim -linteractive $(CFLAGS) $(SENDDATALIBS) $(LDFLAGS) -lf2c "));
txt = Tpl.writeStr(txt, i_fileNamePrefix);
txt = Tpl.writeTok(txt, Tpl.ST_STRING("_records.c"));
then txt;
Expand Down Expand Up @@ -10077,13 +10082,13 @@ algorithm
txt = Tpl.writeStr(txt, i_name);
txt = Tpl.writeTok(txt, Tpl.ST_LINE("_records.c\n"));
txt = Tpl.writeTok(txt, Tpl.ST_STRING("\t"));
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(LINK) $(CFLAGS) -o "));
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(LINK) -o "));
txt = Tpl.writeStr(txt, i_name);
txt = Tpl.writeTok(txt, Tpl.ST_STRING("$(DLLEXT) "));
txt = Tpl.writeStr(txt, i_name);
txt = Tpl.writeTok(txt, Tpl.ST_STRING(".c "));
txt = Tpl.writeText(txt, l_libsStr);
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(LDFLAGS) -lm "));
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(CFLAGS) $(LDFLAGS) -lm "));
txt = Tpl.writeStr(txt, i_name);
txt = Tpl.writeTok(txt, Tpl.ST_STRING("_records.c"));
then txt;
Expand Down

0 comments on commit 8bb6677

Please sign in to comment.