Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 920540b

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Do not recompile Sundials all the time
Belonging to [master]: - #2262
1 parent c4e5102 commit 920540b

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Makefile.common

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,10 @@ breakprocess:
193193
(cd tools/debugging/ && time g++ BreakProcess.cpp -o BreakProcess -static-libgcc)
194194
(cd tools/debugging/ && cp BreakProcess.exe $(builddir_bin))
195195

196-
all-runtimeCPPinstall:
197-
$(MAKE) mkbuilddirs
198-
$(MAKE) CMinpack
199-
$(MAKE) sundials
196+
all-runtimeCPPinstall: mkbuilddirs CMinpack sundials
200197
$(MAKE) all runtimeCPPinstall OMBUILDDIR=$(OMBUILDDIR)
201198

202-
omc-and-runtimeCPPinstall: mkbuilddirs
203-
$(MAKE) CMinpack
204-
$(MAKE) sundials
199+
omc-and-runtimeCPPinstall: mkbuilddirs CMinpack sundials
205200
$(MAKE) omc runtimeCPPinstall OMBUILDDIR=$(OMBUILDDIR)
206201

207202
runtimeCPP: CMinpack sundials $(MINGW_EXTRA_LIBS)
@@ -213,7 +208,7 @@ CMAKE_ARGS=$(filter CMAKE_%, $(MAKEFLAGS))
213208
omcCAPIinstall:
214209
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) omcCAPIinstall CC="$(CC)" CXX="$(CXX)" $(CMAKE_ARGS) OMBUILDDIR=$(OMBUILDDIR)
215210

216-
runtimeCPPinstall:
211+
runtimeCPPinstall: CMinpack sundials
217212
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)" $(CMAKE_ARGS) OMBUILDDIR=$(OMBUILDDIR)
218213
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppCVode.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppCVode.dylib
219214
test ! `uname` = Darwin || install_name_tool -id @rpath/cpp/libOMCppDataExchange.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppDataExchange.dylib
@@ -465,7 +460,9 @@ sqlite3: 3rdParty/sqlite3/Makefile
465460
clean-sqlite3:
466461
rm -rf 3rdParty/sqlite3/build
467462
# build sundials
468-
sundials: 3rdParty/sundials/CMakeLists.txt umfpack
463+
sundials: umfpack
464+
$(MAKE) $(builddir_lib_omc)/libsundials_ida.a
465+
$(builddir_lib_omc)/libsundials_ida.a: 3rdParty/sundials/CMakeLists.txt
469466
mkdir -p 3rdParty/sundials/build
470467
cd 3rdParty/sundials/build && $(CMAKE) .. -G $(CMAKE_TARGET) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_INSTALL_PREFIX=`pwd` -DKLU_ENABLE:Bool=ON -DKLU_LIBRARY_DIR="$(builddir_lib_omc)" -DKLU_INCLUDE_DIR="$(OMBUILDDIR)/include/omc/c/suitesparse/Include/" -DCMAKE_C_FLAGS="$(CFLAGS) -lm -L $(builddir_lib_omc)" $(SUITESPARSE_LIBS) $(IS_MINGW32) $(IS_MINGW64) -DSUITESPARSECONFIG_LIBRARY="" -DLAPACK_ENABLE:Bool=ON
471468
$(MAKE) -C 3rdParty/sundials/build install
@@ -483,10 +480,9 @@ sundials: 3rdParty/sundials/CMakeLists.txt umfpack
483480
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecserial.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
484481
# copy the dlls to the build bin directory
485482
test ! "$(SHREXT)" = ".dll" || (cp -pf 3rdParty/sundials/build/lib/*$(SHREXT) $(builddir_bin))
483+
@touch "$@"
486484
clean-sundials:
487-
if test -d 3rdParty/sundials/build ; then cd 3rdParty/sundials/build && make clean ; fi
488-
rm -rf $(OMBUILDDIR)/include/omc/cpp/sundials
489-
rm -f $(builddir_lib_omc)/libsundials*
485+
rm -rf 3rdParty/sundials/build "$(OMBUILDDIR)/include/omc/cpp/sundials" "$(builddir_lib_omc)/libsundials"* "$(builddir_inc)/c/sundials"
490486

491487
# Build Nox
492488
nox: 3rdParty/trilinos-nox/CMakeLists.txt

0 commit comments

Comments
 (0)