blob: 6145962a353770d0d02b7b7e4835bead00295a4e [file] [log] [blame]
Nick Kralevich1d1011a2012-09-06 10:14:03 -07001# Makefile.am --
2# Copyright 2009 Red Hat Inc., Durham, North Carolina.
3# All Rights Reserved.
4#
5# This library is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# This library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public
16# License along with this library; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19# Authors:
20# Steve Grubb <sgrubb@redhat.com>
21#
22SUBDIRS = test
23EXTRA_DIST = capng_swig.i
24CONFIG_CLEAN_FILES = *.loT *.rej *.orig
25AM_CFLAGS = -fPIC -DPIC
26PYLIBVER ?= python$(PYTHON_VERSION)
27INCLUDES = -I. -I$(top_builddir) -I/usr/include/$(PYLIBVER)
28LIBS = $(top_builddir)/src/libcap-ng.la
29pyexec_PYTHON = capng.py
30pyexec_LTLIBRARIES = _capng.la
31pyexec_SOLIBRARIES = _capng.so
32_capng_la_CFLAGS = -shared
33_capng_la_LDFLAGS = -module -avoid-version -shared
34_capng_la_HEADERS: $(top_builddir)/config.h
35_capng_la_DEPENDENCIES =${top_srcdir}/src/cap-ng.h ${top_builddir}/src/libcap-ng.la
36nodist__capng_la_SOURCES = capng_wrap.c
37capng.py capng_wrap.c: ${srcdir}/capng_swig.i caps.h capng.h
38 swig -o capng_wrap.c -python ${INCLUDES} ${srcdir}/capng_swig.i
39caps.h:
40 cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h
41capng.h:
42 cat ${top_srcdir}/src/cap-ng.h | grep -v '_state' > capng.h
43
44CLEANFILES = capng.py* capng_wrap.c caps.h capng.h *~
45