1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
# nbd client library in userspace
# Copyright Red Hat
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
include $(top_srcdir)/subdir-rules.mk
CLEANFILES += *.pyc t/*~
clean-local:
-rm -rf __pycache__
generator_built = \
libnbdmod.c \
methods.c \
methods.h \
nbd.py \
$(NULL)
EXTRA_DIST = \
examples/LICENSE-FOR-EXAMPLES \
examples/checksum.py \
.flake8 \
$(generator_built) \
nbdsh.py \
pycodestyle.sh \
test-aio-connect-unix.sh \
$(srcdir)/t/*.py \
$(NULL)
TESTS =
if ENABLE_PYCODESTYLE
TESTS += pycodestyle.sh
endif
if HAVE_PYTHON
pythondir = $(PYTHON_INSTALLDIR)
python_DATA = nbd.py nbdsh.py
python_LTLIBRARIES = libnbdmod.la
BUILT_SOURCES = $(generator_built)
libnbdmod_la_SOURCES = \
handle.c \
libnbdmod.c \
methods.c \
methods.h \
utils.c \
$(NULL)
libnbdmod_la_CPPFLAGS = \
$(PYTHON_CFLAGS) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/common/include \
-I$(top_srcdir)/common/utils \
$(NULL)
libnbdmod_la_CFLAGS = \
$(WARNINGS_CFLAGS)
libnbdmod_la_LIBADD = \
$(top_builddir)/common/utils/libutils.la \
$(top_builddir)/lib/libnbd.la \
$(NULL)
libnbdmod_la_LDFLAGS = \
-avoid-version -shared -module -shrext $(PYTHON_EXT_SUFFIX)
if HAVE_NBDKIT
TESTS_ENVIRONMENT = \
LIBNBD_DEBUG=1 \
$(MALLOC_CHECKS) \
$(NULL)
LOG_COMPILER = $(top_builddir)/run
TESTS += \
run-python-tests \
test-aio-connect-unix.sh \
$(NULL)
endif HAVE_NBDKIT
endif HAVE_PYTHON
|