Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 1 | # Copyright (c) 2017 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 |
| 16 | AM_LIBTOOLFLAGS = --quiet |
| 17 | |
Dave Barach | 6a5adc3 | 2018-07-04 10:56:23 -0400 | [diff] [blame] | 18 | AM_CFLAGS = @CPU_FLAGS@ @DLMALLOC@ -Wall -I${top_srcdir} -I${top_builddir} -I. -I$(top_srcdir)/vpp-api/ |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 19 | |
| 20 | AM_LDFLAGS = -shared -avoid-version -rpath /none -no-undefined |
| 21 | |
| 22 | bin_PROGRAMS = |
| 23 | noinst_LTLIBRARIES = |
| 24 | CLEANDIRS = |
| 25 | |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 26 | vapi/%.api.vapi.h: %.api.json vapi_c_gen.py vapi_json_parser.py |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 27 | @echo " VAPI C GEN $< " $@ ; \ |
| 28 | mkdir -p `dirname $@` ; \ |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 29 | $(top_srcdir)/vpp-api/vapi/vapi_c_gen.py --prefix=vapi $< |
| 30 | |
| 31 | vapi/%.api.vapi.hpp: %.api.json vapi_cpp_gen.py vapi_c_gen.py vapi_json_parser.py |
| 32 | @echo " VAPI CPP GEN $< " $@ ; \ |
| 33 | mkdir -p `dirname $@` ; \ |
| 34 | $(top_srcdir)/vpp-api/vapi/vapi_cpp_gen.py --prefix=vapi --gen-h-prefix=vapi $< |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 35 | |
| 36 | %.api.json: |
| 37 | find $(top_builddir) -name '$@' | xargs ln -s |
| 38 | |
| 39 | BUILT_SOURCES = $(shell find $(top_builddir) -name '*.api.json' | xargs -n1 basename) \ |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 40 | $(patsubst %.api.json,vapi/%.api.vapi.h,$(JSON_FILES)) \ |
| 41 | $(patsubst %.api.json,vapi/%.api.vapi.hpp,$(JSON_FILES)) |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 42 | |
| 43 | vapi.c: $(BUILT_SOURCES) |
| 44 | |
| 45 | JSON_FILES = $(wildcard *.api.json) |
| 46 | |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 47 | lib_LTLIBRARIES = libvapiclient.la |
| 48 | |
| 49 | libvapiclient_la_SOURCES = vapi.c |
| 50 | |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 51 | libvapiclient_la_DEPENDENCIES = libvapiclient.map |
| 52 | |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 53 | libvapiclient_la_LIBADD = -lpthread -lm -lrt \ |
| 54 | $(top_builddir)/libvppinfra.la \ |
| 55 | $(top_builddir)/libvlibmemoryclient.la \ |
| 56 | $(top_builddir)/libsvm.la |
| 57 | |
| 58 | libvapiclient_la_LDFLAGS = \ |
| 59 | -Wl,-L$(top_builddir)/.libs,--whole-archive,--no-whole-archive \ |
| 60 | -Wl,--version-script=$(srcdir)/libvapiclient.map,-lrt |
| 61 | |
| 62 | libvapiclient_la_CPPFLAGS = -I. -I$(top_builddir)/vpp-api/vapi |
| 63 | |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 64 | vapiincludedir = $(includedir)/vapi |
| 65 | |
| 66 | vapiinclude_HEADERS = vapi.h \ |
| 67 | vapi.hpp \ |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 68 | vapi_dbg.h \ |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 69 | vapi_common.h \ |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 70 | vapi_internal.h \ |
Klement Sekera | dc15be2 | 2017-06-12 06:49:33 +0200 | [diff] [blame] | 71 | $(patsubst %.api.json,vapi/%.api.vapi.h,$(JSON_FILES)) \ |
| 72 | $(patsubst %.api.json,vapi/%.api.vapi.hpp,$(JSON_FILES)) |
Klement Sekera | 8f2a4ea | 2017-05-04 06:15:18 +0200 | [diff] [blame] | 73 | |
| 74 | # vi:syntax=automake |