-
Notifications
You must be signed in to change notification settings - Fork 22
/
library.xml
97 lines (80 loc) · 3.72 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
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
<xml>
<include name="${HXCPP}/build-tool/BuildCommon.xml"/>
<set name="ios" value="1" if="iphone" />
<set name="tvos" value="1" if="appletv" />
<set name="mac" value="1" if="macos" />
<set name="native_toolkit_sdl_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="sdl" />
<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_sdl_static"/>
<!-- include the files and defines for the lib -->
<include name="${NATIVE_TOOLKIT_PATH}/sdl/files.xml" />
<include name="${NATIVE_TOOLKIT_PATH}/sdl/defines.xml" />
<!-- and finally the targets -->
<target id="native-toolkit-sdl" 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_sdl_static"/>
<ext value="${SLIBEXT}" if="native_toolkit_sdl_static"/>
<!-- add the files to build for the target -->
<files id="native-toolkit-sdl"/>
<!-- linker flags -->
<section unless="native_toolkit_sdl_static">
<section if="mac">
<vflag name="-l" value="iconv"/>
<vflag name="-framework" value="Carbon" />
<vflag name="-framework" value="Cocoa" />
<vflag name="-framework" value="Foundation" />
<vflag name="-framework" value="CoreVideo" />
<vflag name="-framework" value="OpenGL" />
<vflag name="-framework" value="ForceFeedback" />
<vflag name="-framework" value="IOKit" />
<vflag name="-framework" value="CoreAudio" />
<vflag name="-framework" value="AudioUnit" />
</section>
<section if="windows">
<lib name="gdi32.lib" />
<lib name="opengl32.lib" />
<lib name="user32.lib" />
<lib name="kernel32.lib" />
<lib name="advapi32.lib" />
<lib name="winmm.lib" />
<lib name="imm32.lib" />
<lib name="ole32.lib" />
<lib name="oleaut32.lib" />
<lib name="version.lib" />
<lib name="ws2_32.lib" />
<lib name="wldap32.lib" />
<lib name="shell32.lib" />
<lib name="comdlg32.lib" />
</section>
<section if="android">
<lib name="-Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit" if="SNOW_USE_SDL"/>
<lib name="-ldl" />
<lib name="-llog" />
<lib name="-landroid" />
<lib name="-lEGL" />
<lib name="-lGLESv2" />
<lib name="-lGLESv1_CM" />
</section>
<section if="linux">
<lib name="-lpthread" />
<lib name="-lrt" />
<lib name="-lGL" />
</section>
</section>
</target>
<target id="default">
<target id="native-toolkit-sdl"/>
</target>
</xml>