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 |
| 16 | AM_CFLAGS = -Wall |
| 17 | |
| 18 | noinst_PROGRAMS = |
| 19 | BUILT_SOURCES = |
| 20 | bin_PROGRAMS = |
| 21 | CLEANFILES = |
| 22 | lib_LTLIBRARIES = |
| 23 | |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 24 | nobase_include_HEADERS = \ |
| 25 | japi/org_openvpp_vppjapi_vppApi.h \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 26 | japi/org_openvpp_vppjapi_vppConn.h |
| 27 | |
| 28 | lib_LTLIBRARIES += libvppjni.la |
| 29 | |
Robert Varga | 81d99ac | 2016-01-30 18:30:36 +0100 | [diff] [blame^] | 30 | libvppjni_la_SOURCES = japi/vppjni.c japi/vppapi.c japi/vppjni_env.h japi/vppjni_env.c |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 31 | libvppjni_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \ |
| 32 | -lpthread -lm -lrt |
| 33 | libvppjni_la_LDFLAGS = -module |
Robert Varga | 3142430 | 2016-01-30 18:37:58 +0100 | [diff] [blame] | 34 | libvppjni_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 35 | |
| 36 | jarfile = vppjapi-$(PACKAGE_VERSION).jar |
| 37 | packagedir = org/openvpp/vppjapi |
| 38 | JAVAROOT = . |
| 39 | |
| 40 | $(jarfile): libvppjni.la |
| 41 | cd .libs ; $(JAR) cf $(JARFLAGS) ../$@ libvppjni.so.0.0.0 ../$(packagedir)/*.class ; cd .. |
| 42 | |
| 43 | BUILT_SOURCES += japi/org_openvpp_vppjapi_vppConn.h japi/vppapi.c |
| 44 | |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 45 | japi/org_openvpp_vppjapi_vppConn.h: \ |
| 46 | japi/org/openvpp/vppjapi/vppVersion.java \ |
| 47 | japi/org/openvpp/vppjapi/vppInterfaceDetails.java \ |
| 48 | japi/org/openvpp/vppjapi/vppInterfaceCounters.java \ |
| 49 | japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java \ |
| 50 | japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java \ |
| 51 | japi/org/openvpp/vppjapi/vppL2Fib.java \ |
| 52 | japi/org/openvpp/vppjapi/vppIPv4Address.java \ |
| 53 | japi/org/openvpp/vppjapi/vppIPv6Address.java \ |
| 54 | japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java \ |
| 55 | japi/org/openvpp/vppjapi/vppConn.java \ |
| 56 | japi/org/openvpp/vppjapi/vppApiCallbacks.java \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 57 | ../vpp/api/vpe.api.h |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 58 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppVersion.java ; \ |
| 59 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppVersion ; \ |
| 60 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppInterfaceDetails.java ; \ |
| 61 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppInterfaceDetails ; \ |
| 62 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppInterfaceCounters.java ; \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 63 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppInterfaceCounters ; \ |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 64 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java ; \ |
| 65 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppBridgeDomainInterfaceDetails ; \ |
| 66 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java ; \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 67 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppBridgeDomainDetails ; \ |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 68 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppL2Fib.java ; \ |
| 69 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppL2Fib ; \ |
| 70 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppIPv4Address.java ; \ |
| 71 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppIPv4Address ; \ |
| 72 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppIPv6Address.java ; \ |
| 73 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppIPv6Address ; \ |
| 74 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java ; \ |
| 75 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppVxlanTunnelDetails ; \ |
| 76 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppConn.java ; \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 77 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppConn ; |
| 78 | |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 79 | japi/vppapi.c: japi/org_openvpp_vppjapi_vppConn.h |
| 80 | pushd .. ; dir=`pwd` ; popd ; \ |
| 81 | instdir=`echo $${dir} | sed -e 's:build-root/build:build-root/install:'` ; \ |
| 82 | vppapigen --input $${instdir}/vpp/api/vpe.api --jni japi/vppapi.c --app vpe ; \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 83 | vppapigen --input $${instdir}/vpp/api/vpe.api --java japi/vppApi.java --app vpe ; \ |
| 84 | $(JAVAC) -classpath . -d . japi/vppApi.java ; \ |
Dave Wallace | bf8c15e | 2015-12-17 20:54:54 -0500 | [diff] [blame] | 85 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppApi ; \ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 86 | $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppApiCallbacks.java ; \ |
| 87 | $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppApiCallbacks ; |
| 88 | |
| 89 | demo = japi/test/demo.class |
| 90 | $(demo): $(jarfile) |
| 91 | $(JAVAC) -cp $(jarfile) -d $(JAVAROOT) @srcdir@/japi/test/demo.java |
| 92 | |
| 93 | all-local: $(jarfile) $(demo) |