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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 AUTOMAKE_OPTIONS = foreign subdir-objects
15 ACLOCAL_AMFLAGS = -I m4
22 noinst_PROGRAMS = test_pneum
23 nobase_include_HEADERS = pneum/pneum.h
26 # Python / C extension
28 lib_LTLIBRARIES += libpneum.la
29 libpneum_la_SOURCES = pneum/pneum.c
30 libpneum_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread \
32 libpneum_la_LDFLAGS = -module
33 libpneum_la_CPPFLAGS =
38 $(srcdir)/vpp_papi/vpe.py: $(prefix)/../vpp/vpp-api/vpe.api
39 $(info Creating Python binding for $@)
40 $(CC) $(CPPFLAGS) -E -P -C -x c $< \
41 | vppapigen --input - --python - \
42 | pyvppapigen.py --input - > $(srcdir)/vpp_papi/$(notdir $@)
44 $(srcdir)/vpp_papi/memclnt.py: $(prefix)/../vlib-api/vlibmemory/memclnt.api
45 $(info Creating Python binding for $@)
46 $(CC) $(CPPFLAGS) -E -P -C -x c $< \
47 | vppapigen --input - --python - \
48 | pyvppapigen.py --input - > $(srcdir)/vpp_papi/$(notdir $@)
50 # TODO: Support both Python 2 and 3.
51 install-exec-local: $(srcdir)/vpp_papi/vpe.py $(srcdir)/vpp_papi/memclnt.py
53 mkdir -p $(prefix)/lib/python2.7/site-packages; \
54 PYTHONUSERBASE=$(prefix) \
55 python setup.py build_ext -L $(prefix)/lib64 \
56 -I $(prefix)/../vppinfra/include/ install --user
61 noinst_PROGRAMS += test_pneum
62 test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c
63 test_pneum_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread \