Skip to content

Commit

Permalink
- Compile FMI stuff separately.
Browse files Browse the repository at this point in the history
- Create fmiwrapper lib.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12563 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Aug 17, 2012
1 parent f0d0cdc commit 2936776
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 173 deletions.
1 change: 1 addition & 0 deletions Compiler/Makefile.in
Expand Up @@ -108,6 +108,7 @@ clean:
(cd $$d ; $(MAKE) clean) \
done
(cd omc_release; $(MAKE) clean)
(cd runtime/FMI; $(MAKE) clean)
-$(RM) -f $(SRCH)
-$(RM) -f $(builddir_bin)/$(PROG)$(EXEEXT)
-cd $(builddir_bin) && rm -f $(SCRIPT_FILES)
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Util/FMI.mo
Expand Up @@ -37,7 +37,7 @@ public function importFMU
input String inFileName;
input String inWorkingDirectory;
output Boolean outBool;
external "C" outBool=FMIImpl__importFMU(inFileName, inWorkingDirectory) annotation(Library = "omcruntime");
external "C" outBool=FMIImpl__importFMU(inFileName, inWorkingDirectory) annotation(Library = "fmiwrapper");
end importFMU;

end FMI;
44 changes: 0 additions & 44 deletions Compiler/runtime/FMI_rml.c

This file was deleted.

121 changes: 0 additions & 121 deletions Compiler/runtime/FMIimpl.c

This file was deleted.

5 changes: 2 additions & 3 deletions Compiler/runtime/Makefile.common
Expand Up @@ -22,7 +22,7 @@ endif
RML_COMPAT=$(top_builddir)/SimulationRuntime/c/meta/rml_compatibility.h

SRC = Print_rml.c System_rml.c Settings_rml.c \
SimulationResults_rml.c IOStreamExt_rml.c Database_rml.c Socket_rml.c Lapack_rml.c ModelicaExternalC_rml.c matching.c matching_cheap.c FMI_rml.c
SimulationResults_rml.c IOStreamExt_rml.c Database_rml.c Socket_rml.c Lapack_rml.c ModelicaExternalC_rml.c matching.c matching_cheap.c

CPPSRC = unitparser.cpp UnitParserExt_rml.cpp ptolemyio_rml.cpp \
BackendDAEEXT_rml.cpp ErrorMessage.cpp Error_rml.cpp \
Expand All @@ -31,7 +31,7 @@ CPPSRC = unitparser.cpp UnitParserExt_rml.cpp ptolemyio_rml.cpp \
OBJ = $(SRC:.c=.o) $(CPPSRC:.cpp=.o) $(CPPSRC:.cc=.o)

OMC_OBJ = Error_omc.o Print_omc.o System_omc.o Settings_omc.o \
IOStreamExt_omc.o ErrorMessage.o FMI_rml.o systemimplmisc.o \
IOStreamExt_omc.o ErrorMessage.o systemimplmisc.o \
UnitParserExt_omc.o unitparser.o BackendDAEEXT_omc.o Socket_omc.o matching.o matching_cheap.o \
Database_omc.o Dynload_omc.o SimulationResults_omc.o ptolemyio_omc.o Lapack_omc.o $(OMCCORBASRC)

Expand Down Expand Up @@ -80,7 +80,6 @@ SimulationResults_omc.o : SimulationResults.c SimulationResultsCmp.c errorext.h
ptolemyio_rml.o : ptolemyio.cpp errorext.h
ptolemyio_omc.o : ptolemyio.cpp errorext.h $(RML_COMPAT)
ErrorMessage.o : ErrorMessage.cpp ErrorMessage.hpp errorext.h
FMI_rml.o : FMIimpl.c

clean:
$(RM) -rf *.a *.o omc_communication.cc omc_communication.h omc_communication-*
3 changes: 1 addition & 2 deletions Compiler/runtime/Makefile.in
Expand Up @@ -7,7 +7,6 @@
USE_CORBA = @USE_CORBA@

RMLINCLUDE = @rmlinc@
FMIINCLUDE = ../../3rdParty/FMIL/install/include
CFLAGS = @CFLAGS@ $(USE_CORBA)

ifdef USE_CORBA
Expand All @@ -28,7 +27,7 @@ CXX = @CXX@
IDL = @IDLCMD@
IDLPYTHON = @IDLPYTHONCMD@
CXXFLAGS = $(CFLAGS)
CPPFLAGS = @CPPFLAGS@ -I$(RMLINCLUDE) -I$(top_builddir)/SimulationRuntime/c -I$(top_builddir)/SimulationRuntime/c/simulation/results -I$(top_builddir)/SimulationRuntime/c/util -I$(top_builddir)/SimulationRuntime/c/meta -I$(top_builddir)/SimulationRuntime/c/meta/gc -I$(srcdir) -I. $(CORBAINCL) -I$(FMIINCLUDE)
CPPFLAGS = @CPPFLAGS@ -I$(RMLINCLUDE) -I$(top_builddir)/SimulationRuntime/c -I$(top_builddir)/SimulationRuntime/c/simulation/results -I$(top_builddir)/SimulationRuntime/c/util -I$(top_builddir)/SimulationRuntime/c/meta -I$(top_builddir)/SimulationRuntime/c/meta/gc -I$(srcdir) -I. $(CORBAINCL)

include Makefile.common

Expand Down
5 changes: 5 additions & 0 deletions Makefile.common
Expand Up @@ -85,12 +85,17 @@ runtimeCPPinstall:
runtimeCPPclean:
(cd SimulationRuntime/cpp/; $(MAKE) -f $(defaultMakefileTarget) clean)

fmiwrapper:
(cd Compiler/runtime/FMI; $(MAKE) -f $(defaultMakefileTarget))

fmil:
test -d 3rdParty/FMIL
mkdir -p 3rdParty/FMIL/build
(cd 3rdParty/FMIL/build && test -f Makefile || $(CMAKE) -D FMILIB_BUILD_SHARED_LIB:Bool=OFF -D FMILIB_BUILD_TESTS:Bool=OFF -D FMILIB_GENERATE_DOXYGEN_DOC:Bool=OFF -DCMAKE_COLOR_MAKEFILE:Bool=OFF -DFMILIB_INSTALL_PREFIX:String=../install .. -G $(CMAKE_TARGET))
test -f 3rdParty/FMIL/build/libfmilib.a || $(MAKE) -C 3rdParty/FMIL/build
test -d 3rdParty/FMIL/install || $(MAKE) -C 3rdParty/FMIL/build install
cp -p 3rdParty/FMIL/install/lib/libfmilib.a $(builddir_lib)/omc/
cp -rp 3rdParty/FMIL/install/include/* $(builddir_inc)

testfast: test

Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Expand Up @@ -26,10 +26,10 @@ settings:

difftool: mkbuilddirs
$(MAKE) -C testsuite/difftool
omc: difftool interactive docs fmi fmil
omc: difftool interactive docs fmi fmil fmiwrapper
(cd Compiler && $(MAKE) -f Makefile release)

omcd: difftool interactive docs fmi fmil
omcd: difftool interactive docs fmi fmil fmiwrapper
(cd Compiler && $(MAKE) -f Makefile debug)

qtclean-common:
Expand Down

0 comments on commit 2936776

Please sign in to comment.