blob: 58c97a60ee6ce9af173fb47a42418493a2f7c5d9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project name="native" default="default" basedir=".">
<property file="build.properties"/>
<!-- =======================================================================
NetBeans Installer engine specific targets
======================================================================== -->
<!-- =======================================================================
Build native library
======================================================================== -->
<target name="jnilib-init" depends="define-platform,init-platform"/>
<target name="jnilib-clean" depends="jnilib-init" unless="ignore.native">
<exec executable="make" dir="${jnilib.dir}">
<arg value="clean"/>
</exec>
</target>
<target name="jnilib-compile" depends="jnilib-init,jnilib-clean" unless="ignore.native">
<exec executable="make" dir="${jnilib.dir}">
<arg value="build"/>
</exec>
</target>
<target name="jnilib-build" depends="jnilib-init,jnilib-compile"/>
<!-- =======================================================================
Build launcher
======================================================================== -->
<target name="launcher-init" depends="define-platform,init-platform"/>
<target name="launcher-clean" depends="launcher-init" unless="ignore.native">
<exec executable="make" dir="${launcher.dir}">
<arg value="clean"/>
</exec>
</target>
<target name="launcher-compile" depends="launcher-init,launcher-clean" if="is.windows" unless="ignore.native">
<exec executable="make" dir="${launcher.dir}">
<arg value="build"/>
</exec>
</target>
<target name="launcher-build" depends="launcher-init,launcher-compile"/>
<!-- =======================================================================
Build cleaner
======================================================================== -->
<target name="cleaner-init" depends="define-platform,init-platform"/>
<target name="cleaner-clean" depends="cleaner-init" unless="ignore.native">
<exec executable="make" dir="${cleaner.dir}">
<arg value="clean"/>
</exec>
</target>
<target name="cleaner-compile" depends="cleaner-init,cleaner-clean" if="is.windows" unless="ignore.native">
<exec executable="make" dir="${cleaner.dir}">
<arg value="build"/>
</exec>
</target>
<target name="cleaner-build" depends="cleaner-init,cleaner-compile"/>
<!-- =======================================================================
Build all native resources
======================================================================== -->
<target name="native-clean" depends="jnilib-clean,launcher-clean,cleaner-clean"/>
<target name="native-compile" depends="jnilib-compile,launcher-compile,cleaner-compile"/>
<target name="native-build" depends="jnilib-build,launcher-build,cleaner-build"/>
<target name="define-platform">
<condition property="is.windows">
<os family="windows"/>
</condition>
<condition property="is.linux">
<os name="Linux"/>
</condition>
<condition property="is.solaris-x86">
<os name="SunOS" arch="x86"/>
</condition>
<condition property="is.solaris-sparc">
<os name="SunOS" arch="sparc"/>
</condition>
<condition property="is.macosx">
<and>
<os family="mac"/>
<os family="unix"/>
</and>
</condition>
</target>
<target name="init-platform" depends="init-windows,init-linux,init-solaris-x86,init-solaris-sparc,init-macosx"/>
<target name="init-windows" if="is.windows">
<property name="jnilib.dir" value="${native.jnilib.dir.windows}"/>
<property name="jnilib.file" value="${native.jnilib.file.windows}"/>
<property name="launcher.dir" value="${native.launcher.windows.dir}"/>
<property name="cleaner.dir" value="${native.cleaner.windows.dir}"/>
</target>
<target name="init-linux" if="is.linux">
<property name="jnilib.dir" value="${native.jnilib.dir.linux}"/>
<property name="jnilib.file" value="${native.jnilib.file.linux}"/>
<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
<property name="cleaner.dir" value="${native.cleaner.unix.dir}"/>
</target>
<target name="init-solaris-x86" if="is.solaris-x86">
<property name="jnilib.dir" value="${native.jnilib.dir.solaris-x86}"/>
<property name="jnilib.file" value="${native.jnilib.file.solaris-x86}"/>
<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
<property name="cleaner.dir" value="${native.cleaner.unix.dir}"/>
</target>
<target name="init-solaris-sparc" if="is.solaris-sparc">
<property name="jnilib.dir" value="${native.jnilib.dir.solaris-sparc}"/>
<property name="jnilib.file" value="${native.jnilib.file.solaris-sparc}"/>
<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
<property name="cleaner.dir" value="${native.cleaner.unix.dir}"/>
</target>
<target name="init-macosx" if="is.macosx">
<property name="jnilib.dir" value="${native.jnilib.dir.macosx}"/>
<property name="jnilib.file" value="${native.jnilib.file.macosx}"/>
<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
<property name="cleaner.dir" value="${native.cleaner.unix.dir}"/>
</target>
</project>