-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
88 lines (68 loc) · 2.81 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="release" name="AuthKit">
<property name="base" value="."/>
<property name="src" value="${base}/Source"/>
<property name="jnisrc" value="${base}/Source/all-C-src"/>
<property name="builddir" value="out"/>
<property name="classesdir" value="${builddir}/classes"/>
<property name="headersdir" value="${builddir}/headers"/>
<property name="jnidir" value="${builddir}/jni"/>
<property name="distdir" value="JARs"/>
<property name="SDKversion" value="10.12"/>
<property name="SDKroot" value="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDKversion}.sdk" />
<property name="cc" value="/usr/bin/cc"/>
<property name="debug" value="false"/>
<target name="init">
</target>
<target name="clean" description="Remove build directories">
<delete includeEmptyDirs="true" failonerror="false"><fileset dir="${builddir}"/></delete>
</target>
<target name="compile">
<mkdir dir="${classesdir}"/>
<mkdir dir="${headersdir}"/>
<javac source="1.8" target="1.8"
encoding="UTF-8"
srcdir="${src}"
destdir="${classesdir}"
debug="${debug}"
optimize="true"
includeantruntime="false"
>
<compilerarg value="-h"/>
<compilerarg path="${headersdir}"/>
<patternset>
<include name="**/*.java"/>
</patternset>
</javac>
</target>
<target name="compile-JNI" depends="compile">
<mkdir dir="${jnidir}"/>
<exec executable="${cc}" failonerror="true" >
<arg value="-arch"/>
<arg value="x86_64"/>
<arg value="-isysroot"/>
<arg value="${SDKroot}"/>
<env key="MACOSX_DEPLOYMENT_TARGET" value="${SDKversion}"/>
<arg value="-o"/>
<arg value="${jnidir}/libauthkit.dylib"/>
<arg value="-I${SDKroot}/System/Library/Frameworks/JavaVM.framework/Headers"/>
<arg value="-I${headersdir}"/>
<arg value="-dynamiclib"/>
<arg value="-ObjC"/>
<arg value="-framework"/>
<arg value="JavaVM"/>
<arg value="-framework"/>
<arg value="Cocoa"/>
<arg value="-framework"/>
<arg value="Security"/>
<arg value="${jnisrc}/AuthCore.c"/>
<arg value="${jnisrc}/AuthIO.c"/>
</exec>
</target>
<target name="AuthKit" depends="compile-JNI,compile">
<jar jarfile="${distdir}/AuthKit.jar" basedir="${classesdir}">
</jar>
<copy file="${jnidir}/libauthkit.dylib" preservelastmodified="true" tofile="${distdir}/libauthkit.dylib"/>
</target>
<target name="release" depends="clean,AuthKit"/>
</project>