Skip to content

Commit

Permalink
simplify and fix the dependencies for the encryption build
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Mar 21, 2020
1 parent 4650237 commit 19489a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
12 changes: 3 additions & 9 deletions OMCompiler/Makefile.common
Expand Up @@ -66,11 +66,9 @@ else
UMFPACK_LIB_TARGET=$(OMBUILDDIR)/$(LIB_OMC)/libumfpack$(SHREXT)
endif

.PHONY : interactive omc release all fmi test install-dirs susan susan_all susgen sustst install-openturns runtimeCPPinstall CMinpack metis Cdaskr boehm-gc cppzmq $(MINGW_EXTRA_LIBS) antlr-copy $(SEMLA_LIB)
.PHONY : interactive omc release all fmi test install-dirs susan susan_all susgen sustst install-openturns runtimeCPPinstall CMinpack metis Cdaskr boehm-gc cppzmq $(MINGW_EXTRA_LIBS) antlr-copy $(SEMLA_LIB) $(SEMLA_CLEAN)

ifeq ($(OMENCRYPTION),yes)
.PHONY : semla semla-clean

semla:
mkdir -p ../OMEncryption/3rdParty/SEMLA/build
# Build SEMLA
Expand All @@ -94,7 +92,7 @@ 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:
bootstrap-dependencies-post-parser: $(SEMLA_LIB)
$(MAKE) -f $(defaultMakefileTarget) -C Parser install_bootstrapping OMBUILDDIR=$(OMBUILDDIR) OMENCRYPTION=$(OMENCRYPTION)

bootstrap-dependencies: $(BOOTSTRAP_FMIL_DEP) interactive-common cppzmq interactive-short
Expand Down Expand Up @@ -384,11 +382,7 @@ openblas-clean:
# OpenBLAS make clean actually gives error-messages. Let it do it, but silently
test ! -d 3rdParty/OpenBLAS-0.2.8 || $(MAKE) -C 3rdParty/OpenBLAS-0.2.8 clean > /dev/null 2>&1

ifeq ($(OMENCRYPTION),yes)
clean: semla-clean fmil-clean opencl_rt_clean gc-clean lis-clean CMinpack-clean metis-clean Cdaskr-clean bootstrap-clean msgpack-clean graphstream-clean openblas-clean umfpack-clean OMSI-clean
else
clean: fmil-clean opencl_rt_clean gc-clean lis-clean CMinpack-clean metis-clean Cdaskr-clean bootstrap-clean msgpack-clean graphstream-clean openblas-clean umfpack-clean OMSI-clean
endif
clean: $(SEMLA_CLEAN) fmil-clean opencl_rt_clean gc-clean lis-clean CMinpack-clean metis-clean Cdaskr-clean bootstrap-clean msgpack-clean graphstream-clean openblas-clean umfpack-clean OMSI-clean
(cd SimulationRuntime/c && $(MAKE) -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR))
(cd Compiler && $(MAKE) -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR))
(cd Parser && $(MAKE) -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR))
Expand Down
11 changes: 6 additions & 5 deletions OMCompiler/Makefile.in
Expand Up @@ -73,18 +73,19 @@ MINGW_EXTRA_LIBS=@MINGW_EXTRA_LIBS@

SUITESPARSE_LIBS = -DKLU_LIBRARY="libklu$(SHREXT)" -DAMD_LIBRARY="libamd$(SHREXT)" -DCOLAMD_LIBRARY="libcolamd$(SHREXT)" -DBTF_LIBRARY="libbtf$(SHREXT)"

ifeq ($(OMENCRYPTION),yes)
SEMLA_LIB=semla
SEMLA_CLEAN=semla-clean
endif

include Makefile.common
include Makefile.omsi.common

# We don't need OMDEV hacks, but using the same Makefile sure is nice!
.testvariables:
settings:

ifeq ($(OMENCRYPTION),yes)
omc: semla omc-bootstrapped
else
omc: omc-bootstrapped
endif

boehm-gc-lib: @LIBGC@
$(OMBUILDDIR)/$(LIB_OMC)/libomcgc.so: 3rdParty/gc/.libs/libomcgc.so
Expand All @@ -93,7 +94,7 @@ $(OMBUILDDIR)/$(LIB_OMC)/libomcgc.so: 3rdParty/gc/.libs/libomcgc.so
3rdParty/gc/.libs/libomcgc.so: 3rdParty/gc/Makefile
$(MAKE) -C 3rdParty/gc/ libomcgc.la

omc-bootstrapped:
omc-bootstrapped: $(SELMA_LIB)
$(MAKE) interactive sim-dependencies
$(MAKE) -C Compiler/boot OMBUILDDIR=$(OMBUILDDIR)
$(MAKE) -f $(defaultMakefileTarget) -C Compiler install_scripts OMBUILDDIR=$(OMBUILDDIR)
Expand Down
11 changes: 6 additions & 5 deletions OMCompiler/Makefile.omdev.mingw
Expand Up @@ -97,6 +97,11 @@ SUITESPARSE_LIBS=
defaultMakefileTarget = Makefile.omdev.mingw
MAKEFILE_BOOT = LinkMain.makefile.mingw

ifeq ($(OMENCRYPTION),yes)
SEMLA_LIB=semla
SEMLA_CLEAN=semla-clean
endif

include Makefile.common
include Makefile.omsi.common

Expand Down Expand Up @@ -285,11 +290,7 @@ copycppmsvcheader: getMSVCversion
(cp -puf $(BOOST_PATH_MSVC)/boost/*.hpp $(OMBUILDDIR)/include/omc/omsicpp/3rdParty/boost/msvc/boost)
(cp -pufr $(BOOST_PATH_MSVC)/boost/* $(OMBUILDDIR)/include/omc/omsicpp/3rdParty/boost/msvc/boost)

ifeq ($(OMENCRYPTION),yes)
omc: interactive fmil omdev_extra_dlls breakprocess opencl_rt CMinpack metis Cdaskr $(IPOPT_TARGET) graphstream semla OMSI
else
omc: interactive fmil omdev_extra_dlls breakprocess opencl_rt CMinpack metis Cdaskr $(IPOPT_TARGET) graphstream OMSI
endif
omc: interactive fmil omdev_extra_dlls breakprocess opencl_rt CMinpack metis Cdaskr $(IPOPT_TARGET) graphstream $(SEMLA_LIB) OMSI
(time $(MAKE) -f $(defaultMakefileTarget) CFLAGS="$(CFLAGS)" omc-bootstrapped OMBUILDDIR=$(OMBUILDDIR))

boehm-gc-lib: $(OMBUILDDIR)/$(LIB_OMC)/libomcgc.a
Expand Down

0 comments on commit 19489a9

Please sign in to comment.