Skip to content

Commit cc62a7a

Browse files
author
Hugh Sanderson
committed
Add ogg and vorbis to NME_LOCAL_TOOLKIT
1 parent 58e2fac commit cc62a7a

File tree

8 files changed

+146
-6
lines changed

8 files changed

+146
-6
lines changed

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
[submodule "project/toolkit/jpeg/libjpeg-turbo"]
88
path = project/toolkit/jpeg/libjpeg-turbo
99
url = https://github.com/libjpeg-turbo/libjpeg-turbo
10+
[submodule "project/toolkit/vorbis/vorbis"]
11+
path = project/toolkit/vorbis/vorbis
12+
url = https://github.com/xiph/vorbis.git
13+
[submodule "project/toolkit/ogg/ogg"]
14+
path = project/toolkit/ogg/ogg
15+
url = https://github.com/xiph/ogg.git

project/ToolkitBuild.xml

+12-6
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,24 @@
137137
<include name="toolkit/zlib/files.xml" />
138138
<include name="toolkit/png/files.xml" />
139139
<include name="toolkit/jpeg/files.xml" />
140+
<include name="toolkit/ogg/files.xml" />
141+
<include name="toolkit/vorbis/files.xml" />
140142
</section>
143+
141144
<section unless="NME_LOCAL_TOOLKIT">
142145
<set name="NME_ZLIB" value="${NATIVE_TOOLKIT_PATH}/zlib/" />
143146
<include name="${NME_ZLIB}/files.xml" />
144147
<set name="NME_PNG" value="${NATIVE_TOOLKIT_PATH}/png/" />
145148
<include name="${NME_PNG}/files.xml" />
146149
<set name="NME_JPEG" value="${NATIVE_TOOLKIT_PATH}/jpeg/" />
147150
<include name="${NME_JPEG}/files.xml" />
151+
<set name="NME_OGG" value="${NATIVE_TOOLKIT_PATH}/ogg/" />
152+
<include name="${NME_OGG}/files.xml" />
153+
<set name="NME_VORBIS" value="${NATIVE_TOOLKIT_PATH}/vorbis/" />
154+
<include name="${NME_VORBIS}/files.xml" />
148155
</section>
149156

150157

151-
<include name="${NATIVE_TOOLKIT_PATH}/ogg/files.xml" />
152-
<include name="${NATIVE_TOOLKIT_PATH}/vorbis/files.xml" />
153158
<include name="${NATIVE_TOOLKIT_PATH}/curl/files.xml" />
154159
<include name="${NATIVE_TOOLKIT_PATH}/freetype/files.xml" />
155160
<include name="${NATIVE_TOOLKIT_PATH}/sdl/files.xml" />
@@ -332,16 +337,17 @@
332337

333338
<compilerflag value="-I${NME_ZLIB}"/>
334339
<compilerflag value="-I${NME_PNG}"/>
335-
<compilerflag value="-I${NME_PNG}/.." if="NME_LOCAL_TOOLKIT" />
340+
<compilerflag value="-I${NME_PNG}.." if="NME_LOCAL_TOOLKIT" />
336341
<compilerflag value="-I${NME_JPEG}"/>
337-
<compilerflag value="-I${NME_JPEG}/.." if="NME_LOCAL_TOOLKIT" />
342+
<compilerflag value="-I${NME_JPEG}.." if="NME_LOCAL_TOOLKIT" />
343+
<compilerflag value="-I${NME_VORBIS}include"/>
344+
<compilerflag value="-I${NME_OGG}include"/>
345+
<compilerflag value="-I${NME_OGG}.." if="NME_LOCAL_TOOLKIT" />
338346

339347
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype"/>
340348
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/include"/>
341349
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/freetype/include"/>
342350
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/freetype/include/freetype"/>
343-
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/vorbis/include"/>
344-
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/ogg/include"/>
345351
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/modplug" if="modplug" />
346352
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/curl/include" if="NME_CURL" />
347353

project/toolkit/ogg/config_types.h

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifndef __CONFIG_TYPES_H__
2+
#define __CONFIG_TYPES_H__
3+
4+
5+
#ifdef BLACKBERRY
6+
7+
/* QNX */
8+
# include <inttypes.h>
9+
typedef int16_t ogg_int16_t;
10+
typedef uint16_t ogg_uint16_t;
11+
typedef int32_t ogg_int32_t;
12+
typedef uint32_t ogg_uint32_t;
13+
typedef int64_t ogg_int64_t;
14+
15+
#else
16+
# include <inttypes.h>
17+
18+
/* these are filled in by configure */
19+
typedef int16_t ogg_int16_t;
20+
typedef unsigned short ogg_uint16_t;
21+
typedef int32_t ogg_int32_t;
22+
typedef unsigned int ogg_uint32_t;
23+
typedef int64_t ogg_int64_t;
24+
25+
#endif
26+
#endif

project/toolkit/ogg/files.xml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<xml>
2+
3+
<set name="NME_OGG" value="${this_dir}/ogg/" />
4+
5+
<files id="native-toolkit-ogg-depends">
6+
<depend name="${NME_OGG}include/ogg/ogg.h"/>
7+
<depend name="${NME_OGG}include/ogg/os_types.h"/>
8+
<depend name="${NME_OGG}../config_types.h"/>
9+
</files>
10+
11+
<files id="native-toolkit-ogg" tags="" >
12+
13+
<compilerflag value="-I${NME_OGG}include/"/>
14+
<compilerflag value="-I${NME_OGG}"/>
15+
<cache value="1" />
16+
17+
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />
18+
19+
<depend files="native-toolkit-ogg-depends" />
20+
21+
<file name="${NME_OGG}src/bitwise.c" />
22+
<file name="${NME_OGG}src/framing.c" />
23+
24+
</files>
25+
26+
</xml>

project/toolkit/ogg/ogg

Submodule ogg added at db5c7a4

project/toolkit/vorbis/files.xml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<xml>
2+
3+
<set name="NME_VORBIS" value="${this_dir}/vorbis/" />
4+
5+
<files id="native-toolkit-vorbis-depends">
6+
<depend name="${NME_VORBIS}include/vorbis/codec.h"/>
7+
<depend name="${NME_VORBIS}include/vorbis/vorbisenc.h"/>
8+
<depend name="${NME_VORBIS}include/vorbis/vorbisfile.h"/>
9+
</files>
10+
11+
<files id="native-toolkit-vorbis" tags="" >
12+
13+
<cache value="1" />
14+
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />
15+
16+
<depend files="native-toolkit-vorbis-depends"/>
17+
18+
<depend name="${NME_OGG}../config_types.h"/>
19+
<depend name="${NME_OGG}include/ogg/ogg.h"/>
20+
<depend name="${NME_OGG}include/ogg/os_types.h"/>
21+
22+
<depend name="${NME_VORBIS}lib/window.h"/>
23+
<depend name="${NME_VORBIS}lib/smallft.h"/>
24+
<depend name="${NME_VORBIS}lib/scales.h"/>
25+
<depend name="${NME_VORBIS}lib/registry.h"/>
26+
<depend name="${NME_VORBIS}lib/psy.h"/>
27+
<depend name="${NME_VORBIS}lib/os.h"/>
28+
<depend name="${NME_VORBIS}lib/misc.h"/>
29+
<depend name="${NME_VORBIS}lib/mdct.h"/>
30+
<depend name="${NME_VORBIS}lib/masking.h"/>
31+
<depend name="${NME_VORBIS}lib/lsp.h"/>
32+
<depend name="${NME_VORBIS}lib/lpc.h"/>
33+
<depend name="${NME_VORBIS}lib/lookup_data.h"/>
34+
<depend name="${NME_VORBIS}lib/lookup.h"/>
35+
<depend name="${NME_VORBIS}lib/highlevel.h"/>
36+
<depend name="${NME_VORBIS}lib/envelope.h"/>
37+
<depend name="${NME_VORBIS}lib/codec_internal.h"/>
38+
<depend name="${NME_VORBIS}lib/codebook.h"/>
39+
<depend name="${NME_VORBIS}lib/bitrate.h"/>
40+
<depend name="${NME_VORBIS}lib/backends.h"/>
41+
42+
43+
<compilerflag value="-I${NME_VORBIS}include/"/>
44+
<compilerflag value="-I${NME_VORBIS}lib/"/>
45+
<compilerflag value="-I${NME_OGG}/include/"/>
46+
47+
<file name="${NME_VORBIS}lib/mdct.c"/>
48+
<file name="${NME_VORBIS}lib/smallft.c"/>
49+
<file name="${NME_VORBIS}lib/block.c"/>
50+
<file name="${NME_VORBIS}lib/envelope.c"/>
51+
<file name="${NME_VORBIS}lib/window.c"/>
52+
<file name="${NME_VORBIS}lib/lsp.c"/>
53+
<file name="${NME_VORBIS}lib/lpc.c"/>
54+
<file name="${NME_VORBIS}lib/analysis.c"/>
55+
<file name="${NME_VORBIS}lib/synthesis.c"/>
56+
<file name="${NME_VORBIS}lib/psy.c"/>
57+
<file name="${NME_VORBIS}lib/info.c"/>
58+
<file name="${NME_VORBIS}lib/floor1.c"/>
59+
<file name="${NME_VORBIS}lib/floor0.c"/>
60+
<file name="${NME_VORBIS}lib/res0.c"/>
61+
<file name="${NME_VORBIS}lib/mapping0.c"/>
62+
<file name="${NME_VORBIS}lib/registry.c"/>
63+
<file name="${NME_VORBIS}lib/codebook.c"/>
64+
<file name="${NME_VORBIS}lib/sharedbook.c"/>
65+
<!--<file name="${NME_VORBIS}lib/lookup.c"/>-->
66+
<file name="${NME_VORBIS}lib/bitrate.c"/>
67+
<file name="${NME_VORBIS}lib/vorbisfile.c"/>
68+
<file name="${NME_VORBIS}lib/vorbisenc.c"/>
69+
70+
</files>
71+
72+
</xml>

project/toolkit/vorbis/vorbis

Submodule vorbis added at 84c0236

project/toolkit/zlib/files.xml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
<cache value="1" />
1212
<tag value="${NATIVE_TOOLKIT_OPTIM_TAG}" if="NATIVE_TOOLKIT_OPTIM_TAG" />
13+
<compilerflag value="-DSTDC" unless="windows" />
14+
<compilerflag value="-DHAVE_UNISTD_H" unless="windows" />
1315

1416
<depend files="native-toolkit-zlib-depends"/>
1517

0 commit comments

Comments
 (0)