diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-03-20 15:52:37 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-03-20 15:52:37 +0100 |
commit | 53eea5892cd1d51f802533adb9ea94e04b4ce86b (patch) | |
tree | b6875f0aab543e1551c58bfe12d630717894284c /build/linux/Makefile.in | |
parent | 4d0d9ca396378813f8559f479ff9a64b0881a627 (diff) | |
parent | cd32957185094680b84014e1ea8411ce6b142f74 (diff) | |
download | astra-53eea5892cd1d51f802533adb9ea94e04b4ce86b.tar.gz astra-53eea5892cd1d51f802533adb9ea94e04b4ce86b.tar.bz2 astra-53eea5892cd1d51f802533adb9ea94e04b4ce86b.tar.xz astra-53eea5892cd1d51f802533adb9ea94e04b4ce86b.zip |
Merge branch 'macOS'
Diffstat (limited to 'build/linux/Makefile.in')
-rw-r--r-- | build/linux/Makefile.in | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 9066f0a..1c0c56a 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -4,6 +4,7 @@ cuda=@HAVECUDA@ matlab=@HAVEMATLAB@ python=@HAVEPYTHON@ boostutf=@HAVEBOOSTUTF@ +macos=@IS_MACOS@ MATLAB_ROOT=@MATLAB_ROOT@ octave=@HAVEOCTAVE@ @@ -49,7 +50,8 @@ CXXFLAGS+=-g -O3 -Wall -Wshadow LIBS+=-lpthread LDFLAGS+=-g -CPPFLAGS+=@CPPFLAGS_OS@ +CXXFLAGS+=@CXXFLAGS_OS@ +LDFLAGS+=@LDFLAGS_OS@ BOOSTUTF_LIBS=@LIBS_BOOSTUTF@ @@ -64,9 +66,11 @@ endif ifeq ($(matlab),yes) # TODO: Do we also want -fopenmp for octave? CPPFLAGS+=-I$(MATLAB_ROOT)/extern/include -DMATLAB_MEX_FILE +ifeq ($(macos),no) CXXFLAGS+=-fopenmp LDFLAGS+=-fopenmp endif +endif # MODLDFLAGS are the base LDFLAGS for matlab, octave, python modules MODLDFLAGS=$(LDFLAGS) -L$(abs_top_builddir)/.libs @@ -301,6 +305,12 @@ mex: $(MATLAB_MEX) %.$(MEXSUFFIX): %.o $(MATLAB_CXX_OBJECTS) libastra.la $(MEX) LDFLAGS="$(MEXLDFLAGS)" $(MEXFLAGS) $(LIBS) $(MEXLIBS) -lastra -output $* $*.o $(MATLAB_CXX_OBJECTS) +ifeq ($(install_type),module) +ifeq ($(macos),yes) + @# tell macOS dynamic loader to look in mex directory for libastra.0.dylib + install_name_tool -change `otool -DX .libs/$(SONAME)` @loader_path/$(SONAME) $@ +endif +endif ifeq ($(python),yes) matlab/mex/astra_mex_plugin_c.$(MEXSUFFIX): matlab/mex/astra_mex_plugin_c.o $(MATLAB_CXX_OBJECTS) libastra.la |