blob: a5dabc3d4a6e9adb94978e463a6e741a06bc21a2 [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
16AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir}
17
18BUILT_SOURCES =
19bin_PROGRAMS =
20CLEANFILES =
21lib_LTLIBRARIES =
22noinst_PROGRAMS =
23nobase_include_HEADERS = pneum/pneum.h
24
25#
26# Python / C extension
27#
28lib_LTLIBRARIES += libpneum.la
29libpneum_la_SOURCES = pneum/pneum.c
30libpneum_la_LIBADD = \
31 $(top_builddir)/libvppinfra.la \
32 $(top_builddir)/libvlibmemoryclient.la \
33 $(top_builddir)/libvlibapi.la \
34 $(top_builddir)/libsvm.la \
35 -lpthread -lm -lrt
36
37libpneum_la_LDFLAGS = -module
38libpneum_la_CPPFLAGS =
39
40# TODO: Support both Python 2 and 3.
41install-exec-local:
42 cd $(srcdir); \
43 mkdir -p $(prefix)/lib/python2.7/site-packages; \
44 PYTHONUSERBASE=$(prefix) \
Damjan Marion0120e232017-01-08 18:03:21 +010045 python setup.py build_ext -L $(libdir) \
Damjan Marion7cd468a2016-12-19 23:05:39 +010046 -I $(prefix)/include/ install --user
47
48#
49# Test client
50#
51noinst_PROGRAMS += test_pneum
52test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c
53test_pneum_LDADD = \
54 $(top_builddir)/libvppinfra.la \
55 $(top_builddir)/libvlibmemoryclient.la \
56 $(top_builddir)/libvlibapi.la \
57 $(top_builddir)/libsvm.la \
58 -lpthread -lm -lrt
59
60