forked from processing/processing-sound-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·63 lines (54 loc) · 1.99 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
<?xml version="1.0"?>
<project name="Processing Sound Library" default="build">
<property environment="env" />
<property file="build.properties" />
<property name="arch" value="64" />
<condition property="platform" value="OSX">
<os family="mac" />
</condition>
<condition property="platform" value="Win">
<os family="windows" />
</condition>
<condition property="platform" value="Linux">
<and>
<os family="unix" />
<not>
<os family="mac" />
</not>
</and>
</condition>
<target name="clean" description="Clean the build directories">
<delete dir="bin" />
<delete file="library/sound.jar" />
<exec executable="make" dir="src/cpp">
<arg line="-f Makefile_${platform} clean"/>
</exec>
</target>
<target name="methcla" description="Compile and install methcla shared library.">
<exec executable="make" dir="src/cpp" failonerror="true">
<arg line="-f Makefile_${platform} ARCH=${arch} install" />
<env key="PATH" path="${env.PATH}" />
<env key="JAVA_INCLUDES" path="${java_includes}" />
</exec>
</target>
<target name="compile" depends="methcla" description="Compile sources">
<condition property="core-built">
<available file="../processing/core/library/core.jar" />
</condition>
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../processing/core/library/core.jar" />
<mkdir dir="bin" />
<javac source="1.7"
target="1.7"
srcdir="src" destdir="bin"
encoding="UTF-8"
includeAntRuntime="false"
classpath="../processing/core/library/core.jar; library/sound.jar"
nowarn="true">
<compilerclasspath path="../processing/java/mode/org.eclipse.jdt.core.jar;
../processing/java/mode/jdtCompilerAdapter.jar" />
</javac>
</target>
<target name="build" depends="compile" description="Build sound library">
<jar basedir="bin" destfile="library/sound.jar" />
</target>
</project>