Ole Troan | 6855f6c | 2016-04-09 03:16:30 +0200 | [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 subdir-objects |
| 15 | ACLOCAL_AMFLAGS = -I m4 |
| 16 | AM_CFLAGS = -Wall |
| 17 | |
| 18 | BUILT_SOURCES = |
| 19 | bin_PROGRAMS = |
| 20 | CLEANFILES = |
| 21 | lib_LTLIBRARIES = |
| 22 | noinst_PROGRAMS = test_pneum |
| 23 | nobase_include_HEADERS = pneum/pneum.h |
| 24 | |
| 25 | # |
| 26 | # Python binding |
| 27 | # |
| 28 | lib_LTLIBRARIES += libpneum.la |
| 29 | libpneum_la_SOURCES = pneum/pneum.c |
| 30 | libpneum_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread -lm -lrt |
| 31 | libpneum_la_LDFLAGS = -module |
| 32 | libpneum_la_CPPFLAGS = |
| 33 | |
| 34 | BUILT_SOURCES += vpp_papi.py |
| 35 | |
| 36 | vpp_papi.py: $(prefix)/../vpp/api/vpe.api pneum/api-gen.py |
| 37 | @echo " PYTHON API"; \ |
| 38 | $(CC) $(CPPFLAGS) -E -P -C -x c $< \ |
| 39 | | vppapigen --input - --python defs_$@; \ |
| 40 | echo "#include <api/vpe_msg_enum.h>" \ |
| 41 | | $(CC) $(CPPFLAGS) -E -P -x c - | grep VL_API \ |
| 42 | | @srcdir@/pneum/api-gen.py -i defs_$@ > @srcdir@/vpp_papi/$@ |
| 43 | |
| 44 | # |
| 45 | # Test client |
| 46 | # |
| 47 | noinst_PROGRAMS += test_pneum |
| 48 | test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c |
| 49 | test_pneum_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread -lm -lrt |