Skip to content

Commit

Permalink
fixed an error in generate_makefile
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2291 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x02lucpo committed Mar 30, 2006
1 parent a30e1ac commit 4e66875
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Compiler/SimCodegen.rml
Expand Up @@ -150,6 +150,23 @@ with "Types.rml"
string (* directory for mo-file *)
) => () =

rule Util.string_append_list([cname,".cpp"]) => cpp_file &
Util.string_delimit_list(libs, " ") => libs' &
Settings.getInstallationDirectoryPath => omhome' &
System.trim(omhome',"\"") => omhome &
Util.string_append_list(["#Makefile generated by OpenModelica\n\n",
"CXX=g++\n",
cname,": ",cpp_file, "\n",
"\t $(CXX) -o ",cname,".exe ", (* ".exe" is needed for a class that is in a package. *)
cpp_file,
" -L\"",omhome,"/lib/\"",
" -I\"",omhome,"/include/\" ",
" -lsim -lg2c -lc_runtime ",libs', "\n"
]) => str &
System.writeFile(filename,str)
-------------------------
generate_makefile(filename,cname,libs,"")

rule Util.string_append_list([cname,".cpp"]) => cpp_file &
Util.string_delimit_list(libs, " ") => libs' &
Settings.getInstallationDirectoryPath => omhome' &
Expand Down

0 comments on commit 4e66875

Please sign in to comment.