Makefile.am 914 Bytes
Newer Older
gsell's avatar
gsell committed
1 2
if ENABLE_PYTHON

3 4 5 6 7 8 9 10 11
BUILT_SOURCES = H5hut_wrap.c
SWIG_SOURCES = H5hut.i numpy.i

pkgpython_PYTHON = H5hut.py __init__.py
pkgpyexec_LTLIBRARIES = _H5hut.la

_H5hut_la_SOURCES = H5hut_wrap.c $(SWIG_SOURCES)
_H5hut_la_LDFLAGS = -module
_H5hut_la_LIBADD = $(top_builddir)/src/h5core/libH5hut.la 
gsell's avatar
gsell committed
12 13 14 15
_H5hut_la_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS)
_H5hut_la_CPPFLAGS += -I$(top_srcdir)/src/include
_H5hut_la_CPPFLAGS += -I$(PYTHON_PREFIX)/include/python$(PYTHON_VERSION)/
_H5hut_la_CPPFLAGS += -I$(NUMPY_INCLUDE)
gsell's avatar
gsell committed
16

17
if ENABLE_PARALLEL
gsell's avatar
gsell committed
18

gsell's avatar
gsell committed
19
_H5hut_la_CPPFLAGS += -DPARALLEL_IO  -I$(MPI4PY_INCLUDE)
gsell's avatar
gsell committed
20

21
H5hut_wrap.c : $(SWIG_SOURCES)
gsell's avatar
gsell committed
22
	$(SWIG) $(SWIG_PYTHON_OPT) -python -I$(top_srcdir)/src/include -DPARALLEL_IO -I$(MPI4PY_INCLUDE) -o $@ $<
gsell's avatar
gsell committed
23 24 25 26 27 28 29 30 31 32 33 34 35

else

H5hut_wrap.c : $(SWIG_SOURCES)
	$(SWIG) $(SWIG_PYTHON_OPT) -python -I$(top_srcdir)/src/include -o $@ $<

endif

endif

clean: clean-am

clean-local:
gsell's avatar
gsell committed
36
	$(RM) -f *~ H5hut_wrap.c H5hut.py *.pyc