-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
119 lines (100 loc) · 4.76 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!-- @version $Revision: 2234 $ ($Author: skarzhevskyy $) $Date: 2008-05-28 12:52:51 -0400 (Wed, 28 May 2008) $ -->
<project name="Blue Cove" default="default" basedir=".">
<description>
Open source implementation of JSR-82 Java Bluetooth API.
</description>
<property name="product_version" value="2.1.0-SNAPSHOT"/>
<!-- set global properties for this build -->
<property name="src" location="src/main/java"/>
<property name="resources" location="src/main/resources"/>
<property name="build_classes" location="target/classes"/>
<property name="dist" location="target"/>
<property name="java5_src" value="com/intel/bluetooth/*SE5.java"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build_classes}"/>
<condition property="create_jni_headers" value="true">
<or>
<os family="mac"/>
<os family="windows"/>
</or>
</condition>
</target>
<target name="default" depends="compile, jni-headers"/>
<target name="compile" depends="init"
description="compile the source" >
<echo message="compiling on java ${java.specification.version} (${java.version})"/>
<condition property="exclude_SE5" value="${java5_src}">
<or>
<equals arg1="1.1" arg2="${java.specification.version}"/>
<equals arg1="1.2" arg2="${java.specification.version}"/>
<equals arg1="1.3" arg2="${java.specification.version}"/>
<equals arg1="1.4" arg2="${java.specification.version}"/>
</or>
</condition>
<!-- Compile the java code from ${src} -->
<javac source="1.3" target="1.1" debug="true"
srcdir="${src}" destdir="${build_classes}">
<exclude name="com/intel/bluetooth/DebugLog4jAppender.java"/>
<exclude name="${exclude_SE5}"/>
</javac>
</target>
<target name="jni-headers" depends="init" if="create_jni_headers"
description="Create JNI headers" >
<echo message="create JNI headers using java.home ${java.home}"/>
<javah destdir="src/main/c/intelbth" classpath="${build_classes}">
<class name="com.intel.bluetooth.NativeTestInterfaces"/>
<class name="com.intel.bluetooth.BluetoothStackMicrosoft"/>
<class name="com.intel.bluetooth.BluetoothStackWIDCOMM"/>
<class name="com.intel.bluetooth.BluetoothStackBlueSoleil"/>
<class name="com.intel.bluetooth.BluetoothStackToshiba"/>
<class name="com.intel.bluetooth.BluetoothStackOSX"/>
</javah>
</target>
<target name="jar" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Create the directory not present in src distribution -->
<mkdir dir="${resources}"/>
<tstamp>
<format property="today" pattern="yyyy-MM-dd hh:mm:ss" />
</tstamp>
<!-- Put everything in ${build} into the BlueCove-${DSTAMP}.jar file -->
<jar jarfile="${dist}/bluecove-${product_version}.jar">
<manifest>
<attribute name="Description" value="BlueCove JSR-82 implementation"/>
<attribute name="License" value="GNU Library or Lesser General Public License (LGPL)"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Version" value="${product_version}"/>
<attribute name="Build-Date" value="${today}"/>
<attribute name="Built-Env" value="${os.name} ${os.version} ${os.arch}, Java ${java.version}"/>
</manifest>
<fileset dir="${build_classes}">
<include name="**/*.class"/>
<exclude name="**/*.log"/>
<exclude name="**/.*"/>
<exclude name="**/Thumbs.db"/>
<exclude name="com/ibm/oti/connection/CreateConnection.class"/>
<exclude name="com/ibm/oti/vm/**"/>
<exclude name="com/sun/cdc/io/ConnectionBaseInterface.class"/>
</fileset>
<fileset dir="${resources}">
<include name="*.dll"/>
<include name="*.jnilib"/>
</fileset>
<fileset dir=".">
<include name="LICENSE.txt"/>
</fileset>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="all" depends="clean, jar"/>
</project>