summaryrefslogtreecommitdiffstats
path: root/build/linux
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2016-02-22 12:12:27 +0100
committerWillem Jan Palenstijn <wjp@usecode.org>2016-02-22 12:12:27 +0100
commitcd395d2af23530f9da471fd6c512e9890c08f69d (patch)
tree0fb1b8431ef1773d0f4fcee9e780a19a371021a9 /build/linux
parent3743fdc534b39958c105f4124ad1130d3e8b042a (diff)
parentd2705f52766716b4d4627a62de92e7a2480b6b86 (diff)
downloadastra-cd395d2af23530f9da471fd6c512e9890c08f69d.tar.gz
astra-cd395d2af23530f9da471fd6c512e9890c08f69d.tar.bz2
astra-cd395d2af23530f9da471fd6c512e9890c08f69d.tar.xz
astra-cd395d2af23530f9da471fd6c512e9890c08f69d.zip
Merge pull request #111 from wjp/pluginbuild
Remove dependency of libastra on libpython
Diffstat (limited to 'build/linux')
-rw-r--r--build/linux/Makefile.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in
index 3018674..9535b4c 100644
--- a/build/linux/Makefile.in
+++ b/build/linux/Makefile.in
@@ -62,8 +62,6 @@ PYCPPFLAGS := $(CPPFLAGS)
PYCPPFLAGS += -I../include
PYLDFLAGS = $(LDFLAGS)
PYLDFLAGS += -L$(abs_top_builddir)/.libs
-LIBS += -l$(PYLIBVER)
-LDFLAGS += -L$(PYLIBDIR)
endif
# This is below where PYCPPFLAGS copies CPPFLAGS. The python code is built
@@ -97,6 +95,11 @@ ifeq ($(cuda),yes)
MEXFLAGS += -DASTRA_CUDA
endif
+ifeq ($(python),yes)
+MEXPYLDFLAGS='$$LDFLAGS $(LDFLAGS) -L$(PYLIBDIR)'
+MEXPYLIBS=$(MEXLIBS) -l$(PYLIBVER)
+endif
+
endif
LIBDIR=/usr/local/lib
@@ -267,6 +270,11 @@ mex: $(MATLAB_MEX)
%.$(MEXSUFFIX): %.o $(MATLAB_CXX_OBJECTS) libastra.la
$(MEX) LDFLAGS=$(MEXLDFLAGS) $(MEXFLAGS) $(LIBS) $(MEXLIBS) -lastra -output $* $*.o $(MATLAB_CXX_OBJECTS)
+
+ifeq ($(python),yes)
+matlab/mex/astra_mex_plugin_c.$(MEXSUFFIX): matlab/mex/astra_mex_plugin_c.o $(MATLAB_CXX_OBJECTS) libastra.la
+ $(MEX) LDFLAGS=$(MEXPYLDFLAGS) $(MEXFLAGS) $(LIBS) $(MEXPYLIBS) -lastra -output matlab/mex/astra_mex_plugin_c $< $(MATLAB_CXX_OBJECTS)
+endif
endif
ifeq ($(python),yes)
@@ -411,7 +419,7 @@ $(srcdir)/configure: $(srcdir)/configure.ac
@echo "configure.ac has been changed. Regenerating configure script"
cd $(srcdir) && $(SHELL) ./autogen.sh
-.PHONY: all mex test clean distclean install install-libraries
+.PHONY: all mex test clean distclean install install-libraries py python-root-install install-python
# don't remove intermediate files:
.SECONDARY: