mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-15 21:31:12 +00:00
Update build scripts to make building easier
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
<property name="src.dir" location="${basedir}/src"/>
|
<property name="src.dir" location="${basedir}/src"/>
|
||||||
<property name="libs.dir" location="${basedir}/libs"/>
|
<property name="libs.dir" location="${basedir}/libs"/>
|
||||||
|
|
||||||
<property name="libs.pi.dir" location="${libs.dir}/pi"/>
|
<property name="libs.opus.dir" location="${basedir}/jni/nv_opus_dec/"/>
|
||||||
|
<property name="libs.omx.dir" location="${basedir}/jni/nv_omx_dec/"/>
|
||||||
|
|
||||||
<property name="lib.dir" location="${basedir}/lib"/>
|
<property name="lib.dir" location="${basedir}/lib"/>
|
||||||
<property name="build.dir" location="${basedir}/build"/>
|
<property name="build.dir" location="${basedir}/build"/>
|
||||||
@@ -26,9 +27,16 @@
|
|||||||
<delete dir="${classes.dir}"/>
|
<delete dir="${classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="all" depends="limelight-pi"/>
|
<target name="all" depends="clean, dist"/>
|
||||||
|
|
||||||
<target name="limelight-pi" depends="init">
|
<target name="build" depends="compile-native, compile-java"/>
|
||||||
|
|
||||||
|
<target name="compile-native">
|
||||||
|
<exec executable="./build.sh" dir="/home/iwan/Development/limelight/limelight-pi/jni/nv_omx_dec/"/>
|
||||||
|
<exec executable="./build.sh" dir="/home/iwan/Development/limelight/limelight-pi/jni/nv_opus_dec/"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compile-java" depends="init">
|
||||||
<!-- compile limelight -->
|
<!-- compile limelight -->
|
||||||
<javac includeantruntime="false" destdir="${classes.dir}/src">
|
<javac includeantruntime="false" destdir="${classes.dir}/src">
|
||||||
<src path="${src.dir}"/>
|
<src path="${src.dir}"/>
|
||||||
@@ -37,7 +45,9 @@
|
|||||||
<fileset dir="${libs.dir}" includes="*.jar"/>
|
<fileset dir="${libs.dir}" includes="*.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="dist" depends="build">
|
||||||
<!-- construct one-jar file -->
|
<!-- construct one-jar file -->
|
||||||
<one-jar destfile="${build.dir}/limelight-pi.jar">
|
<one-jar destfile="${build.dir}/limelight-pi.jar">
|
||||||
<manifest>
|
<manifest>
|
||||||
@@ -54,7 +64,8 @@
|
|||||||
</lib>
|
</lib>
|
||||||
|
|
||||||
<binlib>
|
<binlib>
|
||||||
<fileset dir="${libs.pi.dir}" includes="*"/>
|
<fileset dir="${libs.opus.dir}" includes="*.so"/>
|
||||||
|
<fileset dir="${libs.omx.dir}" includes="*.so"/>
|
||||||
</binlib>
|
</binlib>
|
||||||
</one-jar>
|
</one-jar>
|
||||||
</target>
|
</target>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
rm *.o libnv_omx_dec.so
|
rm *.o libnv_omx_dec.so
|
||||||
gcc -I /opt/vc/src/hello_pi/libs/ilclient -I /usr/lib/jvm/java-7-openjdk/include -I /usr/lib/jvm/java-7-openjdk/include/linux -I /opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I ./inc -fPIC -L. -c *.c
|
gcc -I /opt/vc/src/hello_pi/libs/ilclient -I $JAVA_HOME/include -I $JAVA_HOME/include/linux -I /opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I ./inc -fPIC -L. -c *.c
|
||||||
gcc -shared -Wl,-soname,libnv_omx_dec.so -Wl,--no-undefined -o libnv_omx_dec.so *.o -L. -L /opt/vc/lib/ -lbcm_host -lopenmaxil -lvcos -lvchiq_arm -lpthread -lrt -L /opt/vc/src/hello_pi/libs/ilclient -lilclient
|
gcc -shared -Wl,-soname,libnv_omx_dec.so -Wl,--no-undefined -o libnv_omx_dec.so *.o -L. -L /opt/vc/lib/ -lbcm_host -lopenmaxil -lvcos -lvchiq_arm -lpthread -lrt -L /opt/vc/src/hello_pi/libs/ilclient -lilclient
|
||||||
rm *.o
|
rm *.o
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
rm *.o libnv_opus_dec.so
|
rm *.o libnv_opus_dec.so
|
||||||
gcc -I include -I /usr/lib/jvm/java-7-openjdk-amd64/include/ -I ./inc -fPIC -c *.c
|
gcc -I include -I $JAVA_HOME/include/ -I $JAVA_HOME/include/linux -I ./inc -fPIC -c *.c
|
||||||
gcc -shared -Wl,-soname,libnv_opus_dec.so -Wl,--no-undefined -o libnv_opus_dec.so *.o -L. -lopus
|
gcc -shared -Wl,-soname,libnv_opus_dec.so -Wl,--no-undefined -o libnv_opus_dec.so *.o -L. -lopus
|
||||||
rm *.o
|
rm *.o
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user