Skip to content

Commit

Permalink
Fixes for parallel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 30, 2019
1 parent a99df61 commit d1598f7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
14 changes: 11 additions & 3 deletions OMCompiler/Makefile.common
@@ -1,5 +1,6 @@

inclu.PHONY : all omc release clean .testvariables checkMSVCwine
inclu.PHONY : all omc release clean .testvariables checkMSVCwine bootstrap-dependencies-post bootstrap-dependencies-post-compiler-runtime bootstrap-dependencies-post-compiler-builtin bootstrap-dependencies-post-parser


unexport PREFIX

Expand Down Expand Up @@ -89,11 +90,17 @@ endif # end of OMENCRYPTION

release: omc

bootstrap-dependencies: graphstream antlr-copy $(BOOTSTRAP_FMIL_DEP) $(MINGW_EXTRA_LIBS) interactive-short libzmq
bootstrap-dependencies-post: bootstrap-dependencies-post-compiler-runtime bootstrap-dependencies-post-compiler-builtin bootstrap-dependencies-post-parser
bootstrap-dependencies-post-compiler-runtime:
$(MAKE) -f $(defaultMakefileTarget) -C Compiler/runtime install_bootstrapping BOOTSTRAPPING=1 OMBUILDDIR=$(OMBUILDDIR)
bootstrap-dependencies-post-compiler-builtin:
$(MAKE) -f $(defaultMakefileTarget) -C Compiler builtin OMBUILDDIR=$(OMBUILDDIR)
bootstrap-dependencies-post-parser:
$(MAKE) -f $(defaultMakefileTarget) -C Parser install_bootstrapping OMBUILDDIR=$(OMBUILDDIR) OMENCRYPTION=$(OMENCRYPTION)

bootstrap-dependencies: $(BOOTSTRAP_FMIL_DEP) interactive-common libzmq interactive-short
$(MAKE) -f $(defaultMakefileTarget) bootstrap-dependencies-post

antlr-copy:
cp ./3rdParty/antlr/3.2/tool/antlr-3.2.jar ./3rdParty/antlr/3.2/tool/antlr-2.7.7.jar ${builddir_java}/

Expand All @@ -107,13 +114,14 @@ $(builddir_share)/omc/omc_communication.idl: Compiler/runtime/omc_communication.
cp -a "$<" "$@"
idl: $(builddir_share)/omc/omc_communication.idl

interactive-common: .testvariables boehm-gc idl ModelicaExternalC antlr-copy $(MINGW_EXTRA_LIBS) OMSI
interactive-common: .testvariables graphstream boehm-gc idl ModelicaExternalC antlr-copy $(MINGW_EXTRA_LIBS) OMSI

interactive-short: .testvariables interactive-common
$(MAKE) -C SimulationRuntime/c -f $(defaultMakefileTarget) bootstrap-dependencies OMBUILDDIR=$(OMBUILDDIR)

interactive: .testvariables interactive-common fmil lis Cdaskr CMinpack docs libzmq $(SUNDIALS_TARGET) $(IPOPT_TARGET) $(UMFPACK_TARGET) antlr-copy $(MINGW_EXTRA_LIBS)
$(MAKE) -C SimulationRuntime/c -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
$(MAKE) -f $(defaultMakefileTarget) bootstrap-dependencies-post

opc: .testvariables boehm-gc
$(MAKE) -C SimulationRuntime/opc/ua -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
Expand Down
4 changes: 2 additions & 2 deletions OMCompiler/Makefile.in
Expand Up @@ -94,14 +94,14 @@ $(OMBUILDDIR)/$(LIB_OMC)/libomcgc.so: 3rdParty/gc/.libs/libomcgc.so
$(MAKE) -C 3rdParty/gc/ libomcgc.la

omc-bootstrapped:
$(MAKE) bootstrap-dependencies interactive sim-dependencies
$(MAKE) interactive sim-dependencies
$(MAKE) -C Compiler/boot OMBUILDDIR=$(OMBUILDDIR)
$(MAKE) -f $(defaultMakefileTarget) -C Compiler install_scripts OMBUILDDIR=$(OMBUILDDIR)
@# See if any library is linked directly into the build dirs (we should use @rpath everywhere)
test ! `uname` = Darwin || ( ! otool -L "$(builddir_lib_omc)"/*.dylib | egrep "$(OMBUILDDIR)|`pwd`" | grep -v : || ( echo All dylibs should be linked using @rpath ; false ) )

omc-no-sim:
$(MAKE) bootstrap-dependencies interactive-short
$(MAKE) bootstrap-dependencies
$(MAKE) -C Compiler/boot OMBUILDDIR=$(OMBUILDDIR)

lis: lis-configure
Expand Down
4 changes: 2 additions & 2 deletions OMCompiler/SimulationRuntime/c/Makefile.common
Expand Up @@ -12,7 +12,7 @@ include Makefile.objs

LIBSIMULATIONFMI=libSimulationRuntimeFMI.a
OMC_MINIMAL_RUNTIME=
INCLUDE_NONFMI=-I$(builddir_inc)/c -I.
INCLUDE_NONFMI=-I. -I$(builddir_inc)/c

CPPFLAGS = -I$(top_builddir)/Compiler/runtime -I$(top_builddir)/3rdParty/gc/include -I$(top_builddir)/3rdParty/FMIL/install/include/ -I$(top_builddir)/3rdParty/lis-1.4.12/include/ -I$(top_builddir)/3rdParty/Ipopt/include/ -I$(builddir_inc)/c/sundials/ $(CONFIG_CPPFLAGS) -DGC_REDIRECT_TO_LOCAL
override CFLAGS += $(CPPFLAGS) $(CONFIG_CFLAGS) $(EXTRA_CFLAGS)
Expand Down Expand Up @@ -240,7 +240,7 @@ $(SIMOBJSPATHC):$(BUILDPATH)/%$(OBJ_EXT): %.c $(SIMHFILESPATH) $(COMMON_HEADERS)

$(OPTIMIZATIONOBJSPATH):$(BUILDPATH)/%$(OBJ_EXT): %.c $(OPTIMIZATIONHFILESPATH) $(COMMON_HEADERS)
$(MKBUILDDIR)
$(CC) -c $(CFLAGS) -I$(builddir_inc)/c -o $@ $<
$(CC) -c -I. $(CFLAGS) -o $@ $<

$(FMIOBJSPATH):$(BUILDPATH)/%$(OBJ_EXT): %.c $(COMMON_HEADERS)
$(MKBUILDDIR)
Expand Down

0 comments on commit d1598f7

Please sign in to comment.