-
Notifications
You must be signed in to change notification settings - Fork 11
/
library.xml
67 lines (52 loc) · 2.5 KB
/
library.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
<xml>
<include name="${HXCPP}/build-tool/BuildCommon.xml"/>
<set name="ios" value="1" if="iphone" />
<set name="mac" value="1" if="macos" />
<set name="tvos" value="1" if="appletv" />
<set name="native_toolkit_openal_static" value="1" if="static_link" />
<!-- when building from native-toolkit path, it should be relative to allow for the lib name -->
<set name="NATIVE_TOOLKIT_PATH" value=".." />
<set name="OUT_DIR" value="lib" />
<!-- lib values -->
<set name="LIBNAME" value="openal" />
<set name="SLIBEXT" value=".lib" if="windows"/>
<set name="SLIBEXT" value=".a" unless="windows"/>
<set name="SHLIBEXT" value=".dll" if="windows"/>
<set name="SHLIBEXT" value=".so" unless="windows"/>
<set name="SHLIBEXT" value=".dylib" if="mac || ios || tvos"/>
<!-- :todo: will use a define to control -debug appendage -->
<set name="DEBUGEXTRA" value="" />
<set name="DEBUGEXTRA" value="" if="native_toolkit_openal_static"/>
<!-- include the files and defines for the lib -->
<include name="${NATIVE_TOOLKIT_PATH}/openal/files.xml" />
<include name="${NATIVE_TOOLKIT_PATH}/openal/defines.xml" />
<!-- and finally the targets -->
<target id="native-toolkit-openal" output="${LIBPREFIX}${LIBNAME}${DEBUGEXTRA}${LIBEXTRA}" tool="linker" toolid="${STD_MODULE_LINK}">
<!-- make sure it lands in lib/Windows or lib/Mac64 etc -->
<outdir name="${OUT_DIR}/${BINDIR}" />
<ext value="${SHLIBEXT}" unless="native_toolkit_openal_static"/>
<ext value="${SLIBEXT}" if="native_toolkit_openal_static"/>
<!-- add the files to build for the target -->
<files id="native-toolkit-openal" unless="ios || android || tvos"/>
<!-- linker flags -->
<section unless="native_toolkit_openal_static">
<section if="windows">
<lib name="user32.lib" />
<lib name="winmm.lib" />
<lib name="ole32.lib" />
<lib name="shell32.lib" />
</section>
<section if="mac">
<vflag name="-framework" value="CoreAudio" />
<vflag name="-framework" value="AudioToolbox" />
<vflag name="-framework" value="AudioUnit" />
</section>
<section if="linux">
<lib name="-lpthread" />
</section>
</section>
</target>
<target id="default">
<target id="native-toolkit-openal"/>
</target>
</xml>