]> Creatis software - gdcm.git/blob - gdcmPython/Makefile.am
b60ac60f3e91a9ba9a8aac059b009b16826e928f
[gdcm.git] / gdcmPython / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 ## $(top_builddir) is required for idtypes.h
4 GDCM_INC   = -I$(top_srcdir)/src  -I$(top_builddir)
5 SWIG_INC   = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) $(GDCM_INC) 
6 INCLUDES   = $(GDCM_INC) $(PYTHON_INCLUDES)
7
8 LIBADDS     = $(top_builddir)/src/libgdcm.la
9
10 ### Non default rules
11
12 pygdcm_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
13
14 if BUILD_PYTHON
15 pythondir = $(prefix)/lib/python${PYTHON_VERSION}/site-packages/gdcm
16 python_LTLIBRARIES = pygdcm.la
17 pygdcm_la_SOURCES = gdcm_wrap.cxx
18 pygdcm_la_LIBADD = $(LIBADDS)
19 gdcm_wrap.cxx: $(srcdir)/gdcm.i
20         $(SWIG)  -python -c++ $(SWIG_INC) -o $@ $<
21
22 MOSTLYCLEANFILES = $(pygdcm_la_SOURCES)
23 BUILT_SOURCES = gdcm_wrap.cxx
24 CLEANFILES = gdcm_wrap.cxx
25
26 dist-hook:
27         rm -f $(distdir)/gdcm_wrap.cxx
28
29 install-data-local:
30         @INSTALL@ -m 0644 gdcm.py $(DESTDIR)$(pythondir)
31         @INSTALL@ -m 0644 __init__.py $(DESTDIR)$(pythondir)
32         cp -a $(DESTDIR)$(pythondir)/pygdcm.so $(DESTDIR)$(pythondir)/_gdcm.so
33 else
34 all:
35 endif
36
37 EXTRA_DIST =  gdcm.i __init__.py testSuite.py