1 ## Process this file with automake to produce Makefile.in
4 VTK_INC = -I/usr/include/vtk
5 LIBS_VTK=-L/usr/lib/vtk \
6 -lvtkCommon -lvtkIO -lvtkFiltering -lvtkRendering -lvtkGraphics \
7 -lvtkImaging -lvtkpng -lvtkzlib -lvtkjpeg -lvtkexpat -lvtktiff \
8 -lvtkftgl -lvtkfreetype
9 LIBS_VTK_PYTHON= $(LIBS_VTK) \
10 -lvtkCommonPython -lvtkIOPython -lvtkFilteringPython \
11 -lvtkRenderingPython -lvtkGraphicsPython -lvtkImagingPython
13 GDCM_INC = -I$(top_srcdir)/src -I$(top_builddir)
14 ### Vtk wrappers of gdcm relate:
15 VTKGDCM_DIR = $(top_srcdir)/vtk/
16 VTKGDCM_INC = -I$(VTKGDCM_DIR)
17 ### Swig related (for wrapping Gdcm):
18 SWIG_INC = $(PYTHON_INCLUDES) $(GDCM_INC)
20 ### The resulting include path:
21 INCLUDES = $(GDCM_INC) $(PYTHON_INCLUDES) $(VTK_INC) $(VTKGDCM_INC)
23 ### Since maude_LDFLAGS cannot be defined conditionaly:
24 pygdcm_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
25 vtkgdcmPython_la_LDFLAGS = -module -avoid-version
27 ############################################################
29 pythondir = $(prefix)/lib/python${PYTHON_VERSION}/site-packages/gdcm
31 GDCMVTKLIB = vtkgdcmPython.la
33 python_LTLIBRARIES = pygdcm.la $(GDCMVTKLIB)
35 ############ Gdcm python wrappers:
36 pygdcm_la_SOURCES = gdcm_wrap.cxx
37 pygdcm_la_LIBADD = $(top_builddir)/src/libgdcm.la -lstdc++
38 gdcm_wrap.cxx: $(srcdir)/gdcm.i
39 $(SWIG) -python -c++ $(SWIG_INC) -o $@ $<
41 ############ Vtk wrappers of Gdcm wrapped for python
43 PYTHON_LIB_BASENAME=vtkgdcmPython
46 PYTHON_WRAPPER = vtkWrapPython
47 PYTHON_WRAPPER_INIT=./vtkWrapPythonInit
50 vtkgdcmPython_la_SOURCES = \
51 vtkGdcmReaderPython.cxx \
53 vtkgdcmPython_la_LIBADD = $(top_builddir)/vtk/libvtkgdcm.la \
56 vtkGdcmReaderPython.cxx: $(VTKGDCM_DIR)/vtkGdcmReader.h
57 $(PYTHON_WRAPPER) $< $(PWFLAGS) $@
59 vtkGdcmInit.cxx : $(VTKGDCM_DIR)/vtkGdcmReader.h $(PYTHON_WRAPPER_INIT)
60 $(PYTHON_WRAPPER_INIT) $(PYTHON_LIB_BASENAME) \
64 $(PYTHON_WRAPPER_INIT) : vtkWrapPythonInit.c
66 endif### BUILD_PYTHON #######################################
68 ############ Automake general usage classics:
69 MOSTLYCLEANFILES = $(pygdcm_la_SOURCES) $(vtkgdcmPython_la_SOURCES)
70 BUILT_SOURCES = $(pygdcm_la_SOURCES) $(vtkgdcmPython_la_SOURCES)
71 CLEANFILES = gdcm_wrap.cxx gdcm.py gdcm.pyc $(PYTHON_WRAPPER_INIT)
74 rm -f $(distdir)/gdcm_wrap.cxx
77 @INSTALL@ -m 0644 gdcm.py $(DESTDIR)$(pythondir)
78 @INSTALL@ -m 0644 __init__.py $(DESTDIR)$(pythondir)
79 cp -a $(DESTDIR)$(pythondir)/pygdcm.so $(DESTDIR)$(pythondir)/_gdcm.so
84 EXTRA_DIST = gdcm.i __init__.py testSuite.py