Mercurial > hg > icedrobot > icedrobot
view make/build.xml @ 3:16fabbbe6121
Rename repositories.
author | Mario Torre <neugens.limasoftware@gmail.com> |
---|---|
date | Mon, 28 Feb 2011 23:33:41 +0100 |
parents | 49d687bd1401 |
children |
line wrap: on
line source
<project name="gnudroid" default="default" basedir=".."> <description>Builds target based on passed build.properties</description> <!-- change the paths to suit your needs --> <property environment="env"/> <property name="base" value="${basedir}" /> <property environment="env"/> <echo message="property file: ${base}/make/${build.target}.properties" /> <property file="${base}/make/${build.target}.properties" /> <!-- source locations --> <property name="src.native" location="${base}/${src.native.target}" /> <!-- build locations --> <property name="build" value="${base}/out" /> <property name="shared.src.include" value="${build}/include" /> <property name="target.lib.so" value="${build}/libs" /> <property name="native.lib.build" value="${build}/${build.target}" /> <property name="native.lib.so" value="${native.lib.build}/${native.lib.target}" /> <!-- cmake configuration --> <property name="cmake.list" value="${src.native}/" /> <echo message="using ${build.target}.properties" /> <!-- =================================================================== --> <!-- ====================== clean and init ============================= --> <!-- IcedRobot wide Clean --> <target name="clean-all" > <echo message="Removing build directory structure" /> <delete dir="${build}"/> </target> <!-- Init generic build directory structure --> <target name="init"> <echo message="Creating directories for native libraries" /> <tstamp/> <mkdir dir="${build}"/> <mkdir dir="${target.lib.so}"/> <mkdir dir="${shared.src.include}"/> <echo message="Copying header files" /> <copy todir="${shared.src.include}" preservelastmodified="true" verbose="true" failonerror="true" overwrite="true"> <path id="android.system.includes"> <fileset dir="../dalvik"> <include name="*/*.h" /> </fileset> <fileset dir="../dalvik/libnativehelper/include/nativehelper/"> <include name="**/*.h" /> </fileset> <fileset dir="../system/core/include"> <include name="*/*.h" /> </fileset> <fileset dir="../frameworks/base/include/"> <include name="**/*.h" /> </fileset> <fileset dir="../external/safe-iop/include"> <include name="*.h" /> </fileset> </path> </copy> <!-- TODO: include this file based on the chosen configuration --> <copy todir="${shared.src.include}" file="../system/core/include/arch/linux-x86/AndroidConfig.h"/> </target> <!-- Clean specific native subproject --> <target name="clean" depends="clean-native" /> <target name="clean-native" > <echo message="Cleaning build directory for ${native.lib.so} project" /> <delete dir="${native.lib.build}"/> <echo message="Removing ${native.lib.so} from target libs" /> <delete dir="${target.lib.so}}"/> </target> <!-- Init specific subproject --> <target name="init-native"> <echo message="Creating directories for native code libraries" /> <tstamp/> <mkdir dir="${native.lib.build}"/> </target> <!-- =================================================================== --> <target name="all" depends="clean-all, init-native, compile-native" /> <target name="default" depends="compile-native" /> <!-- native --> <target name="compile-native" depends='init-native'> <exec executable="cmake" dir="${native.lib.build}" failonerror="true"> <arg line='--debug-output --debug-trycompile -G "Unix Makefiles" ${cmake.list}' /> </exec> <exec executable="make" dir="${native.lib.build}" failonerror="true" /> <!-- copy task doesn't preserve file permissions --> <exec executable="cp" failonerror="true"> <arg line='${native.lib.so} ${target.lib.so} --preserve=all' /> </exec> </target> </project>