Skip to content

Commit

Permalink
- Template-based code generation mostly working again.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5552 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 19, 2010
1 parent 081fdcb commit d5cfd13
Show file tree
Hide file tree
Showing 10 changed files with 1,808 additions and 1,707 deletions.
7 changes: 2 additions & 5 deletions Compiler/CevalScript.mo
Expand Up @@ -4035,8 +4035,7 @@ algorithm
omhome = System.trim(omhome, "\""); //Remove any quotation marks from omhome.
cflags = System.getCFlags();
ldflags = System.getLDFlags();
senddatalibs = System.readEnv("SENDDATALIBS");
senddatalibs = System.trim(senddatalibs, "\"");
senddatalibs = System.getSendDataLibs();
header = Util.stringAppendList({
"#Makefile generated by OpenModelica\n\n",
"CC=",ccompiler,"\n",
Expand All @@ -4046,9 +4045,7 @@ algorithm
"DLLEXT=",dllext,"\n",
"CFLAGS= -I\"",omhome,"/include/omc\" ", cflags ,"\n",
"LDFLAGS= -L\"",omhome,"/lib/omc\" ", ldflags ,"\n",
"ifndef SENDDATALIBS\n",
" SENDDATALIBS=",senddatalibs,"\n",
"endif\n"
"SENDDATALIBS=", senddatalibs ,"\n"
});
then header;
end matchcontinue;
Expand Down
6 changes: 4 additions & 2 deletions Compiler/SimCode.mo
Expand Up @@ -347,6 +347,7 @@ uniontype MakefileParams
String omhome;
String cflags;
String ldflags;
String senddatalibs;
list<String> libs;
end MAKEFILE_PARAMS;
end MakefileParams;
Expand Down Expand Up @@ -1196,7 +1197,7 @@ algorithm
makefileParams :=
matchcontinue (libs)
local
String omhome,header,ccompiler,cxxcompiler,linker,exeext,dllext,cflags,ldflags;
String omhome,header,ccompiler,cxxcompiler,linker,exeext,dllext,cflags,ldflags,senddatalibs;
case (libs)
equation
ccompiler = System.getCCompiler();
Expand All @@ -1208,8 +1209,9 @@ algorithm
omhome = System.trim(omhome, "\""); // Remove any quotation marks from omhome.
cflags = System.getCFlags();
ldflags = System.getLDFlags();
senddatalibs = System.getSendDataLibs();
then MAKEFILE_PARAMS(ccompiler, cxxcompiler, linker, exeext, dllext,
omhome, cflags, ldflags, libs);
omhome, cflags, ldflags, senddatalibs, libs);
end matchcontinue;
end createMakefileParams;

Expand Down

0 comments on commit d5cfd13

Please sign in to comment.