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:
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
24 nobase_include_HEADERS = \
25 japi/org_openvpp_vppjapi_vppApi.h \
26 japi/org_openvpp_vppjapi_vppConn.h
28 lib_LTLIBRARIES += libvppjni.la
30 libvppjni_la_SOURCES = japi/vppjni.c japi/vppapi.c
31 libvppjni_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
33 libvppjni_la_LDFLAGS = -module
35 jarfile = vppjapi-$(PACKAGE_VERSION).jar
36 packagedir = org/openvpp/vppjapi
39 $(jarfile): libvppjni.la
40 cd .libs ; $(JAR) cf $(JARFLAGS) ../$@ libvppjni.so.0.0.0 ../$(packagedir)/*.class ; cd ..
42 BUILT_SOURCES += japi/org_openvpp_vppjapi_vppConn.h japi/vppapi.c
44 japi/org_openvpp_vppjapi_vppConn.h: \
45 japi/org/openvpp/vppjapi/vppVersion.java \
46 japi/org/openvpp/vppjapi/vppInterfaceDetails.java \
47 japi/org/openvpp/vppjapi/vppInterfaceCounters.java \
48 japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java \
49 japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java \
50 japi/org/openvpp/vppjapi/vppL2Fib.java \
51 japi/org/openvpp/vppjapi/vppIPv4Address.java \
52 japi/org/openvpp/vppjapi/vppIPv6Address.java \
53 japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java \
54 japi/org/openvpp/vppjapi/vppConn.java \
55 japi/org/openvpp/vppjapi/vppApiCallbacks.java \
57 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppVersion.java ; \
58 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppVersion ; \
59 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppInterfaceDetails.java ; \
60 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppInterfaceDetails ; \
61 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppInterfaceCounters.java ; \
62 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppInterfaceCounters ; \
63 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java ; \
64 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppBridgeDomainInterfaceDetails ; \
65 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java ; \
66 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppBridgeDomainDetails ; \
67 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppL2Fib.java ; \
68 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppL2Fib ; \
69 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppIPv4Address.java ; \
70 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppIPv4Address ; \
71 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppIPv6Address.java ; \
72 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppIPv6Address ; \
73 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java ; \
74 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppVxlanTunnelDetails ; \
75 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppConn.java ; \
76 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppConn ;
78 japi/vppapi.c: japi/org_openvpp_vppjapi_vppConn.h
79 pushd .. ; dir=`pwd` ; popd ; \
80 instdir=`echo $${dir} | sed -e 's:build-root/build:build-root/install:'` ; \
81 vppapigen --input $${instdir}/vpp/api/vpe.api --jni japi/vppapi.c --app vpe ; \
82 vppapigen --input $${instdir}/vpp/api/vpe.api --java japi/vppApi.java --app vpe ; \
83 $(JAVAC) -classpath . -d . japi/vppApi.java ; \
84 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppApi ; \
85 $(JAVAC) -classpath . -d . @srcdir@/japi/org/openvpp/vppjapi/vppApiCallbacks.java ; \
86 $(JAVAH) -classpath . -d japi org.openvpp.vppjapi.vppApiCallbacks ;
88 demo = japi/test/demo.class
90 $(JAVAC) -cp $(jarfile) -d $(JAVAROOT) @srcdir@/japi/test/demo.java
92 all-local: $(jarfile) $(demo)