Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 1 | # 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 | |
| 14 | AUTOMAKE_OPTIONS = foreign |
| 15 | ACLOCAL_AMFLAGS = -I m4 |
Damjan Marion | 724f64c | 2017-01-11 11:11:00 +0100 | [diff] [blame] | 16 | AM_LIBTOOLFLAGS = --quiet |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 17 | AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} |
| 18 | |
| 19 | BUILT_SOURCES = |
| 20 | bin_PROGRAMS = |
| 21 | CLEANFILES = |
| 22 | lib_LTLIBRARIES = |
| 23 | noinst_PROGRAMS = |
| 24 | nobase_include_HEADERS = pneum/pneum.h |
| 25 | |
| 26 | # |
| 27 | # Python / C extension |
| 28 | # |
| 29 | lib_LTLIBRARIES += libpneum.la |
| 30 | libpneum_la_SOURCES = pneum/pneum.c |
| 31 | libpneum_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 | |
| 38 | libpneum_la_LDFLAGS = -module |
| 39 | libpneum_la_CPPFLAGS = |
| 40 | |
| 41 | # TODO: Support both Python 2 and 3. |
| 42 | install-exec-local: |
| 43 | cd $(srcdir); \ |
Tomofumi Hayashi | dc90d42 | 2017-01-25 13:53:26 +0900 | [diff] [blame] | 44 | mkdir -p $(pythondir); \ |
| 45 | mkdir -p $(pyexecdir); \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 46 | PYTHONUSERBASE=$(prefix) \ |
Damjan Marion | 0120e23 | 2017-01-08 18:03:21 +0100 | [diff] [blame] | 47 | python setup.py build_ext -L $(libdir) \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 48 | -I $(prefix)/include/ install --user |
| 49 | |
| 50 | # |
| 51 | # Test client |
| 52 | # |
Damjan Marion | 724f64c | 2017-01-11 11:11:00 +0100 | [diff] [blame] | 53 | if ENABLE_TESTS |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 54 | noinst_PROGRAMS += test_pneum |
| 55 | test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c |
| 56 | test_pneum_LDADD = \ |
| 57 | $(top_builddir)/libvppinfra.la \ |
| 58 | $(top_builddir)/libvlibmemoryclient.la \ |
| 59 | $(top_builddir)/libvlibapi.la \ |
| 60 | $(top_builddir)/libsvm.la \ |
| 61 | -lpthread -lm -lrt |
Damjan Marion | 724f64c | 2017-01-11 11:11:00 +0100 | [diff] [blame] | 62 | endif |