Skip to content

Commit

Permalink
- fix bootstrapping in Windows OMDEV (link sendData when building .dl…
Browse files Browse the repository at this point in the history
…l to get all depends of omcruntime).

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7214 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 26, 2010
1 parent 8bb6677 commit 3b3fa1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Compiler/SimCodeC.mo
Expand Up @@ -10021,6 +10021,7 @@ algorithm
local
Tpl.Text txt;
String i_name;
String i_makefileParams_senddatalibs;
String i_makefileParams_ldflags;
String i_makefileParams_cflags;
String i_makefileParams_omhome;
Expand All @@ -10033,7 +10034,7 @@ algorithm
Tpl.Text l_libsStr;

case ( txt,
SimCode.FUNCTIONCODE(makefileParams = SimCode.MAKEFILE_PARAMS(libs = i_makefileParams_libs, ccompiler = i_makefileParams_ccompiler, cxxcompiler = i_makefileParams_cxxcompiler, linker = i_makefileParams_linker, exeext = i_makefileParams_exeext, dllext = i_makefileParams_dllext, omhome = i_makefileParams_omhome, cflags = i_makefileParams_cflags, ldflags = i_makefileParams_ldflags), name = i_name) )
SimCode.FUNCTIONCODE(makefileParams = SimCode.MAKEFILE_PARAMS(libs = i_makefileParams_libs, ccompiler = i_makefileParams_ccompiler, cxxcompiler = i_makefileParams_cxxcompiler, linker = i_makefileParams_linker, exeext = i_makefileParams_exeext, dllext = i_makefileParams_dllext, omhome = i_makefileParams_omhome, cflags = i_makefileParams_cflags, ldflags = i_makefileParams_ldflags, senddatalibs = i_makefileParams_senddatalibs), name = i_name) )
equation
l_libsStr = Tpl.pushIter(Tpl.emptyTxt, Tpl.ITER_OPTIONS(0, NONE(), SOME(Tpl.ST_STRING(" ")), 0, 0, Tpl.ST_NEW_LINE(), 0, Tpl.ST_NEW_LINE()));
l_libsStr = lm_248(l_libsStr, i_makefileParams_libs);
Expand Down Expand Up @@ -10067,6 +10068,9 @@ algorithm
txt = Tpl.writeTok(txt, Tpl.ST_STRING("/lib/omc\" "));
txt = Tpl.writeStr(txt, i_makefileParams_ldflags);
txt = Tpl.softNewLine(txt);
txt = Tpl.writeTok(txt, Tpl.ST_STRING("SENDDATALIBS="));
txt = Tpl.writeStr(txt, i_makefileParams_senddatalibs);
txt = Tpl.softNewLine(txt);
txt = Tpl.writeTok(txt, Tpl.ST_STRING_LIST({
"\n",
".PHONY: "
Expand All @@ -10088,7 +10092,7 @@ algorithm
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(" $(CFLAGS) $(LDFLAGS) -lm "));
txt = Tpl.writeTok(txt, Tpl.ST_STRING(" $(CFLAGS) $(LDFLAGS) $(SENDDATALIBS) -lm "));
txt = Tpl.writeStr(txt, i_name);
txt = Tpl.writeTok(txt, Tpl.ST_STRING("_records.c"));
then txt;
Expand Down
3 changes: 2 additions & 1 deletion Compiler/susan_codegen/SimCode/SimCodeC.tpl
Expand Up @@ -2537,10 +2537,11 @@ case FUNCTIONCODE(makefileParams=MAKEFILE_PARAMS(__)) then
DLLEXT=<%makefileParams.dllext%>
CFLAGS= -I"<%makefileParams.omhome%>/include/omc" <%makefileParams.cflags%>
LDFLAGS= -L"<%makefileParams.omhome%>/lib/omc" <%makefileParams.ldflags%>
SENDDATALIBS=<%makefileParams.senddatalibs%>

.PHONY: <%name%>
<%name%>: <%name%>.c <%name%>.h <%name%>_records.c
<%\t%> $(LINK) -o <%name%>$(DLLEXT) <%name%>.c <%libsStr%> $(CFLAGS) $(LDFLAGS) -lm <%name%>_records.c
<%\t%> $(LINK) -o <%name%>$(DLLEXT) <%name%>.c <%libsStr%> $(CFLAGS) $(LDFLAGS) $(SENDDATALIBS) -lm <%name%>_records.c
>>
end functionsMakefile;

Expand Down

0 comments on commit 3b3fa1d

Please sign in to comment.