From 56809b0359af7e9108adeb1fd21823a225edf6fa Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 20 Jan 2016 18:08:59 +0100 Subject: Remove dependency of libastra on libpython by refactoring PluginAlgorithm --- build/linux/Makefile.in | 2 -- 1 file changed, 2 deletions(-) (limited to 'build') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 3018674..d5644bc 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 -- cgit v1.2.3 From 96fa285132bf88462c33c5b24cc1b241fb3d4d73 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 21 Jan 2016 14:30:32 +0100 Subject: Initialize Python plugins when available in Matlab --- build/linux/Makefile.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index d5644bc..57ed8f8 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -95,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 @@ -265,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) -- cgit v1.2.3 From 3c194763acb879f0d51b7d4c90c3aad667223214 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 21 Jan 2016 14:37:07 +0100 Subject: Add missing .PHONY targets --- build/linux/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 57ed8f8..9535b4c 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -419,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: -- cgit v1.2.3 From 46836ee3195fdc8d09a0f03cee13b475b4ff9fc1 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 10 Feb 2016 17:14:54 +0100 Subject: Update gen.py to work on more python versions --- build/msvc/gen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/msvc/gen.py b/build/msvc/gen.py index 999710f..cc69a62 100644 --- a/build/msvc/gen.py +++ b/build/msvc/gen.py @@ -1,6 +1,8 @@ from __future__ import print_function import sys import os +import codecs +import six vcppguid = "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942" # C++ project siguid = "2150E333-8FDC-42A3-9474-1A3956D46DE8" # project group @@ -428,7 +430,10 @@ P_astra["files"].sort() projects = [ P_astra, F_astra_mex, P0, P1, P2, P3, P4, P5, P6, P7, P8 ] -bom = "\xef\xbb\xbf" +if six.PY2: + bom = "\xef\xbb\xbf" +else: + bom = codecs.BOM_UTF8.decode("utf-8") class Configuration: def __init__(self, debug, cuda, x64): -- cgit v1.2.3 From 2206dba14d1830af0e22a3fd06f301da01398c0e Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Thu, 3 Mar 2016 13:01:00 +0100 Subject: Include PluginAlgorithm in non-Python builds as well --- build/linux/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 9535b4c..5d3f677 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -150,6 +150,7 @@ BASE_OBJECTS=\ src/ParallelProjectionGeometry3D.lo \ src/ParallelVecProjectionGeometry3D.lo \ src/PlatformDepSystemCode.lo \ + src/PluginAlgorithm.lo \ src/ProjectionGeometry2D.lo \ src/ProjectionGeometry3D.lo \ src/Projector2D.lo \ @@ -255,7 +256,6 @@ MATLAB_MEX=\ matlab/mex/astra_mex_direct_c.$(MEXSUFFIX) ifeq ($(python),yes) -ALL_OBJECTS+=src/PluginAlgorithm.lo MATLAB_MEX+=matlab/mex/astra_mex_plugin_c.$(MEXSUFFIX) endif -- cgit v1.2.3 From ac5d33197f5e1e07327ba1f7eee8b1c91fad2fe6 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 1 Mar 2016 17:24:33 +0100 Subject: Revert "Use nvcc's -MT option" This reverts commit 29c5c86e56697286a92031aaa9fdd903b3bcc426. This fixes building with CUDA 5.5. --- build/linux/Makefile.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 9535b4c..951e9f0 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -315,8 +315,10 @@ ifeq ($(cuda),yes) ifeq ($(gen_static_libs),yes) @$(NVCC) $(NVCCFLAGS) -c $(<) -o $*.o >/dev/null 2>&1 endif - @# Generate a .d file, with target name $*.lo - @$(NVCC) $(NVCCFLAGS) -M $(<) -MT $(*F).lo -odir $(*D) -o $(*D)/$(DEPDIR)/$(*F).d + @# Generate a .d file, and change the target name in it from .o to .lo + @$(NVCC) $(NVCCFLAGS) -M $(<) -odir $(*D) -o $(*D)/$(DEPDIR)/$(*F).d2 + @sed '1s/\.o :/.lo :/' < $(*D)/$(DEPDIR)/$(*F).d2 > $(*D)/$(DEPDIR)/$(*F).d + @rm -f $(*D)/$(DEPDIR)/$(*F).d2 @# Generate empty targets for all dependencies listed in the .d file. @# This mimics gcc's -MP option. @for x in `cat $(*D)/$(DEPDIR)/$(*F).d`; do if test a$$x != a: -a a$$x != a\\; then echo -e "\n$$x:\n" >> $(*D)/$(DEPDIR)/$(*F).d; fi; done -- cgit v1.2.3