Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | # Copyright (c) 2015 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 |
Marek Gradzki | 2fee4c8 | 2016-11-25 08:38:29 +0100 | [diff] [blame] | 16 | AM_CFLAGS = -Wall |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 17 | |
Marek Gradzki | 2fee4c8 | 2016-11-25 08:38:29 +0100 | [diff] [blame] | 18 | noinst_PROGRAMS = |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 19 | BUILT_SOURCES = |
Marek Gradzki | 2fee4c8 | 2016-11-25 08:38:29 +0100 | [diff] [blame] | 20 | bin_PROGRAMS = |
| 21 | CLEANFILES = |
| 22 | lib_LTLIBRARIES = |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 23 | |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 24 | # |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 25 | # jvpp-common |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 26 | # |
| 27 | |
Marek Gradzki | 948b95a | 2016-07-20 14:53:48 +0200 | [diff] [blame] | 28 | nobase_include_HEADERS = \ |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 29 | jvpp-common/jvpp_common.h |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 30 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 31 | lib_LTLIBRARIES += libjvpp_common.la |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 32 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 33 | libjvpp_common_la_SOURCES = jvpp-common/jvpp_common.c |
| 34 | libjvpp_common_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \ |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 35 | -lpthread -lm -lrt |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 36 | libjvpp_common_la_LDFLAGS = -module |
| 37 | libjvpp_common_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 38 | |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 39 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 40 | # |
| 41 | # jvpp-registry (connection management + plugin registry) |
| 42 | # |
| 43 | lib_LTLIBRARIES += libjvpp_registry.la |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 44 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 45 | libjvpp_registry_la_SOURCES = jvpp-registry/jvpp_registry.c |
| 46 | libjvpp_registry_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \ |
| 47 | -lpthread -lm -lrt -ljvpp_common |
| 48 | libjvpp_registry_la_LDFLAGS = -module |
Klement Sekera | 1a939e8 | 2016-10-19 12:31:25 +0200 | [diff] [blame] | 49 | libjvpp_registry_la_CPPFLAGS = -Ijvpp-registry -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux |
Ed Warnicke | 14fbdfc | 2016-10-20 16:47:54 +0000 | [diff] [blame] | 50 | EXTRA_libjvpp_registry_la_DEPENDENCIES=libjvpp_common.la |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 51 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 52 | jarfile_jvpp_registry = jvpp-registry-$(PACKAGE_VERSION).jar |
Marek Gradzki | e85581c | 2016-09-28 10:12:04 +0200 | [diff] [blame] | 53 | packagedir_jvpp_registry = io/fd/vpp/jvpp |
Marek Gradzki | d85036f | 2016-04-26 12:09:05 +0200 | [diff] [blame] | 54 | |
Marek Gradzki | e85581c | 2016-09-28 10:12:04 +0200 | [diff] [blame] | 55 | BUILT_SOURCES += jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 56 | |
Klement Sekera | 1a939e8 | 2016-10-19 12:31:25 +0200 | [diff] [blame] | 57 | jvpp_registry_src_files := $(wildcard @srcdir@/jvpp-registry/$(packagedir_jvpp_registry)/*.java) $(wildcard @srcdir@/jvpp-registry/$(packagedir_jvpp_registry)/**/*.java) |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 58 | |
Klement Sekera | 1a939e8 | 2016-10-19 12:31:25 +0200 | [diff] [blame] | 59 | jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h: $(jvpp_registry_src_files) |
| 60 | @echo " jvpp-registry.jar generation" |
| 61 | mkdir -p jvpp-registry/target |
| 62 | $(JAVAC) -d jvpp-registry/target $(jvpp_registry_src_files) |
| 63 | $(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.VppJNIConnection |
| 64 | $(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.JVppRegistryImpl |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 65 | |
| 66 | $(jarfile_jvpp_registry): libjvpp_registry.la |
| 67 | cp .libs/libjvpp_registry.so.0.0.0 jvpp-registry/target; \ |
| 68 | $(JAR) cf $(JARFLAGS) $@ -C jvpp-registry/target .; |
| 69 | |
| 70 | # |
| 71 | # jvpp-core (Java wrapper for vpe.api) |
| 72 | # |
| 73 | lib_LTLIBRARIES += libjvpp_core.la |
| 74 | |
| 75 | libjvpp_core_la_SOURCES = jvpp-core/jvpp_core.c jvpp-core/jvpp_core_gen.h |
| 76 | libjvpp_core_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \ |
| 77 | -lpthread -lm -lrt -ljvpp_common |
| 78 | libjvpp_core_la_LDFLAGS = -module |
| 79 | libjvpp_core_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux |
| 80 | |
| 81 | jarfile_jvpp_core = jvpp-core-$(PACKAGE_VERSION).jar |
Marek Gradzki | e85581c | 2016-09-28 10:12:04 +0200 | [diff] [blame] | 82 | packagedir_jvpp_core = io/fd/vpp/jvpp/core |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 83 | |
Marek Gradzki | e85581c | 2016-09-28 10:12:04 +0200 | [diff] [blame] | 84 | BUILT_SOURCES += jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 85 | |
Dave Barach | 496e127 | 2016-12-07 09:15:58 -0500 | [diff] [blame] | 86 | jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h: \ |
| 87 | jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h \ |
Pavel Kotucek | bbe3362 | 2016-12-20 13:19:48 +0100 | [diff] [blame] | 88 | $(prefix)/../vnet/vnet/af_packet.api.json \ |
Pavel Kotucek | 8b2b794 | 2016-12-20 14:05:46 +0100 | [diff] [blame] | 89 | $(prefix)/../vnet/vnet/netmap.api.json \ |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 90 | $(prefix)/../vnet/vnet/vhost_user.api.json \ |
Dave Barach | 496e127 | 2016-12-07 09:15:58 -0500 | [diff] [blame] | 91 | $(prefix)/../vpp/vpp-api/vpe.api.json \ |
| 92 | $(prefix)/../vnet/vnet/ip.api.json \ |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 93 | $(prefix)/../vnet/vnet/tap.api.json \ |
Pavel Kotucek | 296b201 | 2016-12-19 14:47:09 +0100 | [diff] [blame^] | 94 | $(prefix)/../vnet/vnet/vxlan.api.json \ |
| 95 | $(prefix)/../vnet/vnet/vxlan_gpe.api.json |
Klement Sekera | 1a939e8 | 2016-10-19 12:31:25 +0200 | [diff] [blame] | 96 | cp -rf @srcdir@/jvpp-core/* -t jvpp-core/ |
| 97 | mkdir -p jvpp-core/target |
| 98 | cd jvpp-core \ |
Marek Gradzki | 81c7dfc | 2016-09-29 13:22:35 +0200 | [diff] [blame] | 99 | && mkdir -p types dto future callfacade callback notification \ |
Marek Gradzki | 2fee4c8 | 2016-11-25 08:38:29 +0100 | [diff] [blame] | 100 | && @srcdir@/jvpp/gen/jvpp_gen.py --plugin_name core \ |
Ole Troan | f14e3bf | 2016-12-01 21:49:03 +0100 | [diff] [blame] | 101 | -i $(prefix)/../vpp/vpp-api/vpe.api.json \ |
Pavel Kotucek | bbe3362 | 2016-12-20 13:19:48 +0100 | [diff] [blame] | 102 | $(prefix)/../vnet/vnet/af_packet.api.json \ |
Pavel Kotucek | 8b2b794 | 2016-12-20 14:05:46 +0100 | [diff] [blame] | 103 | $(prefix)/../vnet/vnet/netmap.api.json \ |
Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 104 | $(prefix)/../vnet/vnet/vhost_user.api.json \ |
Ole Troan | f14e3bf | 2016-12-01 21:49:03 +0100 | [diff] [blame] | 105 | $(prefix)/../vnet/vnet/interface.api.json \ |
Marek Gradzki | 6dcda02 | 2016-12-05 13:36:01 +0100 | [diff] [blame] | 106 | $(prefix)/../vnet/vnet/l2.api.json \ |
Ole Troan | f0c90e2 | 2016-12-06 12:50:08 +0100 | [diff] [blame] | 107 | $(prefix)/../vnet/vnet/map.api.json \ |
Dave Barach | b5e8a77 | 2016-12-06 12:04:42 -0500 | [diff] [blame] | 108 | $(prefix)/../vnet/vnet/ip.api.json \ |
Jan Srnicek | 3257580 | 2016-12-07 07:36:37 +0100 | [diff] [blame] | 109 | $(prefix)/../vnet/vnet/span.api.json \ |
Dave Barach | 496e127 | 2016-12-07 09:15:58 -0500 | [diff] [blame] | 110 | $(prefix)/../vnet/vnet/tap.api.json \ |
Pavel Kotucek | adb13d6 | 2016-12-19 14:35:35 +0100 | [diff] [blame] | 111 | $(prefix)/../vnet/vnet/vxlan.api.json \ |
Pavel Kotucek | 296b201 | 2016-12-19 14:47:09 +0100 | [diff] [blame^] | 112 | $(prefix)/../vnet/vnet/vxlan_gpe.api.json \ |
Marek Gradzki | 81c7dfc | 2016-09-29 13:22:35 +0200 | [diff] [blame] | 113 | && cp -rf types dto future callfacade callback notification *.java -t $(packagedir_jvpp_core) \ |
| 114 | && rm -rf types dto future callfacade callback notification *.java |
| 115 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 116 | $(JAVAC) -classpath jvpp-registry/target -d jvpp-core/target jvpp-core/$(packagedir_jvpp_core)/*.java \ |
Marek Gradzki | 81c7dfc | 2016-09-29 13:22:35 +0200 | [diff] [blame] | 117 | jvpp-core/$(packagedir_jvpp_core)/types/*.java \ |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 118 | jvpp-core/$(packagedir_jvpp_core)/dto/*.java \ |
| 119 | jvpp-core/$(packagedir_jvpp_core)/callback/*.java \ |
| 120 | jvpp-core/$(packagedir_jvpp_core)/notification/*.java \ |
| 121 | jvpp-core/$(packagedir_jvpp_core)/future/*.java \ |
| 122 | jvpp-core/$(packagedir_jvpp_core)/callfacade/*.java \ |
Marek Gradzki | 2fee4c8 | 2016-11-25 08:38:29 +0100 | [diff] [blame] | 123 | jvpp-core/$(packagedir_jvpp_core)/test/*.java \ |
Klement Sekera | 1a939e8 | 2016-10-19 12:31:25 +0200 | [diff] [blame] | 124 | || (echo "jvpp-core compilation failed: $$?"; exit 1) |
| 125 | $(JAVAH) -force -classpath jvpp-registry/target:jvpp-core/target -d jvpp-core io.fd.vpp.jvpp.core.JVppCoreImpl |
Dave Barach | aff7077 | 2016-10-31 11:59:07 -0400 | [diff] [blame] | 126 | |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 127 | $(jarfile_jvpp_core): libjvpp_core.la |
Klement Sekera | 1a939e8 | 2016-10-19 12:31:25 +0200 | [diff] [blame] | 128 | cp .libs/libjvpp_core.so.0.0.0 jvpp-core/target |
| 129 | $(JAR) cf $(JARFLAGS) $@ -C jvpp-core/target . |
Marek Gradzki | 66ea26b | 2016-07-26 15:28:22 +0200 | [diff] [blame] | 130 | |
| 131 | all-local: $(jarfile_jvpp_registry) $(jarfile_jvpp_core) |