Skip to content

Commit a580905

Browse files
committed
Add SDL files as submodules
1 parent cd9fb09 commit a580905

File tree

16 files changed

+2502
-13
lines changed

16 files changed

+2502
-13
lines changed

.gitmodules

+11
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@
1616
[submodule "project/toolkit/freetype/freetype"]
1717
path = project/toolkit/freetype/freetype
1818
url = https://github.com/freetype/freetype.git
19+
[submodule "project/toolkit/sdl/SDL"]
20+
path = project/toolkit/sdl/SDL
21+
url = https://github.com/libsdl-org/SDL.git
22+
branch = SDL2
23+
[submodule "project/toolkit/sdl-mixer/SDL_mixer"]
24+
path = project/toolkit/sdl-mixer/SDL_mixer
25+
url = https://github.com/libsdl-org/SDL_mixer.git
26+
branch = SDL2
27+
[submodule "project/toolkit/modplug/libmodplug"]
28+
path = project/toolkit/modplug/libmodplug
29+
url = https://github.com/Konstanty/libmodplug.git

project/ToolkitBuild.xml

+25-13
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
<set name="NME_SIMD_D" value="-DNME_SIMD_X86_64" />
5757
<set name="NME_SIMD_X86_64" value="1" />
5858
</section>
59-
60-
61-
<!-- Where to find static libraries/includes -->
62-
<set name="NATIVE_TOOLKIT_PATH" value="${haxelib:nme-toolkit}" unless="NATIVE_TOOLKIT_PATH" />
59+
<section if="HXCPP_M32 windows" unless="NME_SIMD_D">
60+
<set name="NME_SIMD_D" value="-DNME_SIMD_X86" />
61+
<set name="NME_SIMD_X86" value="1" />
62+
</section>
6363

6464

6565
<!--
@@ -140,8 +140,15 @@
140140
<include name="toolkit/ogg/files.xml" />
141141
<include name="toolkit/vorbis/files.xml" />
142142
<include name="toolkit/freetype/files.xml" />
143+
<include name="toolkit/sdl/files.xml" />
144+
<include name="toolkit/modplug/files.xml" if="modplug" />
145+
<include name="toolkit/sdl-mixer/files.xml" if="NME_MIXER" />
143146
</section>
144147

148+
149+
<!-- Where to find static libraries/includes -->
150+
<set name="NATIVE_TOOLKIT_PATH" value="${haxelib:nme-toolkit}" unless="NATIVE_TOOLKIT_PATH" />
151+
145152
<section unless="NME_LOCAL_TOOLKIT">
146153
<set name="NME_ZLIB" value="${NATIVE_TOOLKIT_PATH}/zlib/" />
147154
<include name="${NME_ZLIB}/files.xml" />
@@ -155,13 +162,17 @@
155162
<include name="${NME_VORBIS}/files.xml" />
156163
<set name="NME_FREETYPE" value="${NATIVE_TOOLKIT_PATH}/freetype/" />
157164
<include name="${NME_FREETYPE}files.xml" />
165+
<set name="NME_LIBSDL" value="${NATIVE_TOOLKIT_PATH}/sdl/" />
166+
<include name="${NME_LIBSDL}files.xml" />
167+
<set name="NME_MODPLUG" value="${NATIVE_TOOLKIT_PATH}/modplug/" />
168+
<include name="${NME_MODPLUG}/files.xml" if="modplug" />
169+
<set name="NME_LIBSDL_MIXER" value="${NATIVE_TOOLKIT_PATH}/sdl-mixer/" />
170+
<include name="${NME_LIBSDL_MIXER}files.xml" if="NME_MIXER" />
158171
</section>
159172

160173

161-
<include name="${NATIVE_TOOLKIT_PATH}/curl/files.xml" />
162-
<include name="${NATIVE_TOOLKIT_PATH}/sdl/files.xml" />
163-
<include name="${NATIVE_TOOLKIT_PATH}/modplug/files.xml" if="modplug" />
164-
<include name="${NATIVE_TOOLKIT_PATH}/sdl-mixer/files.xml" if="NME_MIXER" />
174+
175+
<include name="${NATIVE_TOOLKIT_PATH}/curl/files.xml" if="NME_CURL" />
165176

166177
<include name="${NATIVE_TOOLKIT_PATH}/angle/files.xml" if="NME_ANGLE" unless="ANGLE_DIR" />
167178
<include name="${ANGLE_DIR}/files.xml" if="NME_ANGLE ANGLE_DIR" />
@@ -352,7 +363,7 @@
352363
<compilerflag value="-I${NME_FREETYPE}freetype/include/freetype"/>
353364
<compilerflag value="-I${NME_FREETYPE}include/freetype"/>
354365

355-
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/modplug" if="modplug" />
366+
<compilerflag value="-I${NME_MODPLUG}" if="modplug" />
356367
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/curl/include" if="NME_CURL" />
357368

358369
<depend files="native-toolkit-freetype-depends" />
@@ -376,9 +387,10 @@
376387
<file name="${SRC_DIR}/audio/SDLSound.cpp" if="NME_MIXER"/>
377388
<file name="${SRC_DIR}/sdl2/SDL2Stage.cpp"/>
378389
<section unless="NME_NATIVE_SDL_SYSTEM" >
379-
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include" />
380-
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl-mixer" if="NME_MIXER" />
381390
<compilerflag value="-I${SDL_CONFIG_PATH}" if="SDL_CONFIG_PATH" />
391+
<compilerflag value="-I${NME_LIBSDL}include" />
392+
<compilerflag value="-I${NME_LIBSDL_MIXER}" if="NME_MIXER" />
393+
<compilerflag value="-I${NME_LIBSDL_MIXER}/include" if="NME_MIXER" />
382394
</section>
383395
<section if="gcw0" >
384396
<compilerflag value="-I${GCW0_SDK}/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL2" />
@@ -708,7 +720,7 @@
708720
<depend name="${HXCPP}/include/hx/HxcppMain.h"/>
709721
<file name="${this_dir}/src/winrt/Main.cpp" />
710722
<compilerflag value="-Iinclude" />
711-
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include" />
723+
<compilerflag value="-I${NME_LIBSDL}include" />
712724
<compilerflag value="-I${SDL_CONFIG_PATH}" if="SDL_CONFIG_PATH" />
713725
<cache value="1" />
714726
</files>
@@ -757,7 +769,7 @@
757769
<section if="NME_METAL">
758770
<compilerflag value="-DSDL_VIDEO_METAL=1" />
759771
<compilerflag value="-DSDL_VIDEO_RENDER_METAL=1" />
760-
<file name="${NATIVE_TOOLKIT_PATH}/sdl/src/render/metal/SDL_render_metal.m" />
772+
<file name="${NME_LIBSDL}/src/render/metal/SDL_render_metal.m" />
761773
</section>
762774

763775
<section if="NME_MIXER linux" >

project/src/audio/Audio.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <vorbis/vorbisfile.h>
77

88
#ifdef NME_MODPLUG
9+
#define MODPLUG_STATIC
910
#include <modplug.h>
1011
#endif
1112

project/toolkit/modplug/config.h

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/* src/config.h. Generated from config.h.in by configure. */
2+
/* src/config.h.in. Generated from configure.in by autoheader. */
3+
4+
/* Define if building universal (internal helper macro) */
5+
/* #undef AC_APPLE_UNIVERSAL_BUILD */
6+
7+
/* Define to 1 if you have the <dlfcn.h> header file. */
8+
#ifndef HX_WINDOWS
9+
#define HAVE_DLFCN_H 1
10+
11+
/* Define to 1 if you have the <inttypes.h> header file. */
12+
#define HAVE_INTTYPES_H 1
13+
#endif
14+
15+
/* Define to 1 if you have the <malloc.h> header file. */
16+
#ifdef HX_LINUX
17+
#define HAVE_MALLOC_H 1
18+
#endif
19+
20+
/* Define to 1 if you have the <memory.h> header file. */
21+
#define HAVE_MEMORY_H 1
22+
23+
/* Define to 1 if you have the `setenv' function. */
24+
#ifndef HX_WINDOWS
25+
#define HAVE_SETENV 1
26+
#endif
27+
28+
/* Define to 1 if you have the `sinf' function. */
29+
#define HAVE_SINF 1
30+
31+
/* Define to 1 if you have the <stdint.h> header file. */
32+
#define HAVE_STDINT_H 1
33+
34+
/* Define to 1 if you have the <stdlib.h> header file. */
35+
#define HAVE_STDLIB_H 1
36+
37+
/* Define to 1 if you have the <strings.h> header file. */
38+
#define HAVE_STRINGS_H 1
39+
40+
/* Define to 1 if you have the <string.h> header file. */
41+
#define HAVE_STRING_H 1
42+
43+
/* Define to 1 if you have the <sys/stat.h> header file. */
44+
#define HAVE_SYS_STAT_H 1
45+
46+
/* Define to 1 if you have the <sys/types.h> header file. */
47+
#define HAVE_SYS_TYPES_H 1
48+
49+
/* Define to 1 if you have the <unistd.h> header file. */
50+
#define HAVE_UNISTD_H 1
51+
52+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
53+
*/
54+
#define LT_OBJDIR ".libs/"
55+
56+
/* Name of package */
57+
#define PACKAGE "libmodplug"
58+
59+
/* Define to the address where bug reports for this package should be sent. */
60+
#define PACKAGE_BUGREPORT ""
61+
62+
/* Define to the full name of this package. */
63+
#define PACKAGE_NAME ""
64+
65+
/* Define to the full name and version of this package. */
66+
#define PACKAGE_STRING ""
67+
68+
/* Define to the one symbol short name of this package. */
69+
#define PACKAGE_TARNAME ""
70+
71+
/* Define to the home page for this package. */
72+
#define PACKAGE_URL ""
73+
74+
/* Define to the version of this package. */
75+
#define PACKAGE_VERSION ""
76+
77+
/* Define to 1 if you have the ANSI C header files. */
78+
#define STDC_HEADERS 1
79+
80+
/* Version number of package */
81+
#define VERSION "0.8.8.4"
82+
83+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
84+
significant byte first (like Motorola and SPARC, unlike Intel). */
85+
#if defined AC_APPLE_UNIVERSAL_BUILD
86+
# if defined __BIG_ENDIAN__
87+
# define WORDS_BIGENDIAN 1
88+
# endif
89+
#else
90+
# ifndef WORDS_BIGENDIAN
91+
/* # undef WORDS_BIGENDIAN */
92+
# endif
93+
#endif
94+
95+
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
96+
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
97+
#define below would cause a syntax error. */
98+
/* #undef _UINT32_T */
99+
100+
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
101+
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
102+
#define below would cause a syntax error. */
103+
/* #undef _UINT64_T */
104+
105+
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
106+
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
107+
#define below would cause a syntax error. */
108+
/* #undef _UINT8_T */
109+
110+
/* Define to the type of a signed integer type of width exactly 16 bits if
111+
such a type exists and the standard includes do not define it. */
112+
/* #undef int16_t */
113+
114+
/* Define to the type of a signed integer type of width exactly 32 bits if
115+
such a type exists and the standard includes do not define it. */
116+
/* #undef int32_t */
117+
118+
/* Define to the type of a signed integer type of width exactly 64 bits if
119+
such a type exists and the standard includes do not define it. */
120+
/* #undef int64_t */
121+
122+
/* Define to the type of a signed integer type of width exactly 8 bits if such
123+
a type exists and the standard includes do not define it. */
124+
/* #undef int8_t */
125+
126+
/* Define to the type of an unsigned integer type of width exactly 16 bits if
127+
such a type exists and the standard includes do not define it. */
128+
/* #undef uint16_t */
129+
130+
/* Define to the type of an unsigned integer type of width exactly 32 bits if
131+
such a type exists and the standard includes do not define it. */
132+
/* #undef uint32_t */
133+
134+
/* Define to the type of an unsigned integer type of width exactly 64 bits if
135+
such a type exists and the standard includes do not define it. */
136+
/* #undef uint64_t */
137+
138+
/* Define to the type of an unsigned integer type of width exactly 8 bits if
139+
such a type exists and the standard includes do not define it. */
140+
/* #undef uint8_t */

project/toolkit/modplug/files.xml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<xml>
2+
3+
<set name="NME_MODPLUG" value="${this_dir}/libmodplug/src/" />
4+
5+
<include name="${HXCPP}/build-tool/BuildCommon.xml" unless="build_common_included" />
6+
7+
8+
<files id="native-toolkit-modplug-depends" >
9+
<depend name="${NME_MODPLUG}modplug.h"/>
10+
<depend name="${NME_MODPLUG}/../../config.h"/>
11+
</files>
12+
13+
<files id="native-toolkit-modplug" tags="" >
14+
<cache value="1" />
15+
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />
16+
<depend files="native-toolkit-modplug-depends" />
17+
18+
<depend name="${NME_MODPLUG}libmodplug/sndfile.h"/>
19+
<depend name="${NME_MODPLUG}libmodplug/stdafx.h"/>
20+
<depend name="${NME_MODPLUG}libmodplug/it_defs.h"/>
21+
<depend name="${NME_MODPLUG}tables.h"/>
22+
<depend name="${NME_MODPLUG}load_pat.h"/>
23+
24+
<compilerflag value="-I${NME_MODPLUG}libmodplug" />
25+
<compilerflag value="-I${NME_MODPLUG}" />
26+
<compilerflag value="-I${NME_MODPLUG}/../.." />
27+
<compilerflag value="-DMODPLUG_STATIC" />
28+
<compilerflag value="-DHAVE_CONFIG_H" />
29+
30+
<cache value="1" />
31+
32+
<file name="${NME_MODPLUG}modplug.cpp" />
33+
<file name="${NME_MODPLUG}sndmix.cpp" />
34+
<file name="${NME_MODPLUG}load_med.cpp" />
35+
<file name="${NME_MODPLUG}load_mdl.cpp" />
36+
<file name="${NME_MODPLUG}load_dmf.cpp" />
37+
<file name="${NME_MODPLUG}load_it.cpp" />
38+
<file name="${NME_MODPLUG}load_ams.cpp" />
39+
<file name="${NME_MODPLUG}load_abc.cpp" />
40+
<file name="${NME_MODPLUG}load_s3m.cpp" />
41+
<file name="${NME_MODPLUG}sndfile.cpp" />
42+
<file name="${NME_MODPLUG}load_669.cpp" />
43+
<file name="${NME_MODPLUG}load_dsm.cpp" />
44+
<file name="${NME_MODPLUG}load_okt.cpp" />
45+
<file name="${NME_MODPLUG}load_mtm.cpp" />
46+
<file name="${NME_MODPLUG}load_far.cpp" />
47+
<file name="${NME_MODPLUG}load_amf.cpp" />
48+
<file name="${NME_MODPLUG}load_mt2.cpp" />
49+
<file name="${NME_MODPLUG}load_umx.cpp" />
50+
<file name="${NME_MODPLUG}mmcmp.cpp" />
51+
<file name="${NME_MODPLUG}snd_fx.cpp" />
52+
<file name="${NME_MODPLUG}load_stm.cpp" />
53+
<file name="${NME_MODPLUG}load_mid.cpp" />
54+
<file name="${NME_MODPLUG}fastmix.cpp" />
55+
<file name="${NME_MODPLUG}load_dbm.cpp" />
56+
<file name="${NME_MODPLUG}load_ptm.cpp" />
57+
<file name="${NME_MODPLUG}load_xm.cpp" />
58+
<file name="${NME_MODPLUG}load_wav.cpp" />
59+
<file name="${NME_MODPLUG}load_ult.cpp" />
60+
<file name="${NME_MODPLUG}load_pat.cpp" />
61+
<file name="${NME_MODPLUG}load_psm.cpp" />
62+
<file name="${NME_MODPLUG}snd_flt.cpp" />
63+
<file name="${NME_MODPLUG}load_mod.cpp" />
64+
<file name="${NME_MODPLUG}snd_dsp.cpp" />
65+
</files>
66+
67+
</xml>
68+

project/toolkit/modplug/libmodplug

Submodule libmodplug added at d1b97ed

project/toolkit/sdl-mixer/SDL_mixer

Submodule SDL_mixer added at 59caf94

0 commit comments

Comments
 (0)