Pick up jdk version from environment
... instead of hard-coding the version in ant build file. Change-Id: I382803ee7c557e02fc02bda53f140b46aa0f2146
This commit is contained in:
parent
40031d0420
commit
1315cf9c36
@ -6,10 +6,12 @@
|
||||
# so you may need root privilege to execute this script
|
||||
set -x
|
||||
|
||||
STORLETS_JDK_VERSION=${STORLETS_JDK_VERSION:-11}
|
||||
|
||||
# install c library
|
||||
cd src/c/sbus
|
||||
make && make install
|
||||
cd -
|
||||
|
||||
# Install java library
|
||||
ant install
|
||||
STORLETS_JDK_VERSION=${STORLETS_JDK_VERSION} ant install
|
||||
|
@ -16,6 +16,8 @@
|
||||
<project>
|
||||
<property name="jarname" value="SBusJavaFacade.jar"/>
|
||||
<property name="libdir" value="/usr/local/lib/storlets/java"/>
|
||||
<property environment="env"/>
|
||||
<property name="env.STORLETS_JDK_VERSION" value="11"/>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="bin" />
|
||||
@ -37,8 +39,8 @@
|
||||
<target name="so" depends="java">
|
||||
<exec dir="." executable="gcc">
|
||||
<arg line="-shared -o bin/libjsbus.so -fPIC" />
|
||||
<arg line="-I/usr/lib/jvm/java-11-openjdk-amd64/include/" />
|
||||
<arg line="-I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/" />
|
||||
<arg line="-I/usr/lib/jvm/java-${env.STORLETS_JDK_VERSION}-openjdk-amd64/include/" />
|
||||
<arg line="-I/usr/lib/jvm/java-${env.STORLETS_JDK_VERSION}-openjdk-amd64/include/linux/" />
|
||||
<arg line="-I../../c/sbus/" />
|
||||
<arg line="SBusJNI.c ../../c/sbus/sbus.c" />
|
||||
</exec>
|
||||
|
Loading…
Reference in New Issue
Block a user