blob: 16c4762715729dfcc1f59d2b6f9e63add1d8a0eb [file] [log] [blame]
Damjan Marion7cd468a2016-12-19 23:05:39 +01001# Copyright (c) 2016 Cisco and/or its affiliates.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at:
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14AUTOMAKE_OPTIONS = foreign
15ACLOCAL_AMFLAGS = -I m4
Damjan Marion724f64c2017-01-11 11:11:00 +010016AM_LIBTOOLFLAGS = --quiet
Damjan Marion7cd468a2016-12-19 23:05:39 +010017AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir}
18
19BUILT_SOURCES =
20bin_PROGRAMS =
21CLEANFILES =
22lib_LTLIBRARIES =
23noinst_PROGRAMS =
24nobase_include_HEADERS = pneum/pneum.h
25
26#
27# Python / C extension
28#
29lib_LTLIBRARIES += libpneum.la
30libpneum_la_SOURCES = pneum/pneum.c
31libpneum_la_LIBADD = \
32 $(top_builddir)/libvppinfra.la \
33 $(top_builddir)/libvlibmemoryclient.la \
34 $(top_builddir)/libvlibapi.la \
35 $(top_builddir)/libsvm.la \
36 -lpthread -lm -lrt
37
38libpneum_la_LDFLAGS = -module
39libpneum_la_CPPFLAGS =
40
41# TODO: Support both Python 2 and 3.
42install-exec-local:
43 cd $(srcdir); \
44 mkdir -p $(prefix)/lib/python2.7/site-packages; \
45 PYTHONUSERBASE=$(prefix) \
Damjan Marion0120e232017-01-08 18:03:21 +010046 python setup.py build_ext -L $(libdir) \
Damjan Marion7cd468a2016-12-19 23:05:39 +010047 -I $(prefix)/include/ install --user
48
49#
50# Test client
51#
Damjan Marion724f64c2017-01-11 11:11:00 +010052if ENABLE_TESTS
Damjan Marion7cd468a2016-12-19 23:05:39 +010053noinst_PROGRAMS += test_pneum
54test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c
55test_pneum_LDADD = \
56 $(top_builddir)/libvppinfra.la \
57 $(top_builddir)/libvlibmemoryclient.la \
58 $(top_builddir)/libvlibapi.la \
59 $(top_builddir)/libsvm.la \
60 -lpthread -lm -lrt
Damjan Marion724f64c2017-01-11 11:11:00 +010061endif