Skip to content

Commit 71de94c

Browse files
committed
- Updated the generation of Makefile header so you don't have to specify SENDDATALIBS if you run it manually.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5248 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 6b21019 commit 71de94c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Compiler/CevalScript.mo

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4022,7 +4022,7 @@ public function generateMakefileHeader
40224022
algorithm
40234023
hdr := matchcontinue ()
40244024
local
4025-
String omhome,header,ccompiler,cxxcompiler,linker,exeext,dllext,cflags,ldflags;
4025+
String omhome,header,ccompiler,cxxcompiler,linker,exeext,dllext,cflags,ldflags,senddatalibs;
40264026
case()
40274027
equation
40284028
ccompiler = System.getCCompiler();
@@ -4034,6 +4034,8 @@ algorithm
40344034
omhome = System.trim(omhome, "\""); //Remove any quotation marks from omhome.
40354035
cflags = System.getCFlags();
40364036
ldflags = System.getLDFlags();
4037+
senddatalibs = System.readEnv("SENDDATALIBS");
4038+
senddatalibs = System.trim(senddatalibs, "\"");
40374039
header = Util.stringAppendList({
40384040
"#Makefile generated by OpenModelica\n\n",
40394041
"CC=",ccompiler,"\n",
@@ -4042,7 +4044,10 @@ algorithm
40424044
"EXEEXT=",exeext,"\n",
40434045
"DLLEXT=",dllext,"\n",
40444046
"CFLAGS= -I\"",omhome,"/include\" ", cflags ,"\n",
4045-
"LDFLAGS= -L\"",omhome,"/lib\" ", ldflags ,"\n"
4047+
"LDFLAGS= -L\"",omhome,"/lib\" ", ldflags ,"\n",
4048+
"ifndef SENDDATALIBS\n",
4049+
" SENDDATALIBS=",senddatalibs,"\n",
4050+
"endif\n"
40464051
});
40474052
then header;
40484053
end matchcontinue;

0 commit comments

Comments
 (0)