| 1 | #### |
| 2 | # Seccomp Library Python Bindings |
| 3 | # |
| 4 | |
| 5 | # |
| 6 | # This library is free software; you can redistribute it and/or modify it |
| 7 | # under the terms of version 2.1 of the GNU Lesser General Public License |
| 8 | # as published by the Free Software Foundation. |
| 9 | # |
| 10 | # This library is distributed in the hope that it will be useful, but |
| 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser |
| 13 | # General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU Lesser General Public License |
| 16 | # along with this library; if not, see <http://www.gnu.org/licenses>. |
| 17 | # |
| 18 | |
| 19 | PYTHON = /usr/bin/env python |
| 20 | |
| 21 | PY_DISTUTILS = \ |
| 22 | VERSION_RELEASE="@PACKAGE_VERSION@" \ |
| 23 | CPPFLAGS="-I\${top_srcdir}/include ${AM_CPPFLAGS} ${CPPFLAGS}" \ |
| 24 | CFLAGS="${AM_CFLAGS} ${CFLAGS}" \ |
| 25 | LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" \ |
| 26 | ${PYTHON} ./setup.py |
| 27 | |
| 28 | # support silent builds |
| 29 | PY_BUILD_0 = @echo " PYTHON " $@; ${PY_DISTUTILS} -q build |
| 30 | PY_BUILD_1 = ${PY_DISTUTILS} build |
| 31 | PY_BUILD_ = ${PY_BUILD_0} |
| 32 | PY_BUILD = ${PY_BUILD_@AM_V@} |
| 33 | |
| 34 | PY_INSTALL = ${PY_DISTUTILS} install |
| 35 | |
| 36 | EXTRA_DIST = libseccomp.pxd seccomp.pyx setup.py |
| 37 | |
| 38 | all-local: build |
| 39 | |
| 40 | build: ../libseccomp.la libseccomp.pxd seccomp.pyx setup.py |
| 41 | ${PY_BUILD} && touch build |
| 42 | |
| 43 | install-exec-local: build |
| 44 | ${PY_INSTALL} --prefix=${DESTDIR}/${prefix} |
| 45 | |
| 46 | clean-local: |
| 47 | ${RM} -rf seccomp.c build |