Skip to content

Commit 3e54120

Browse files
committed
Merge branch 'master' into testScripts
Conflicts: README.md
2 parents 386d84d + 6608398 commit 3e54120

File tree

5 files changed

+27
-32
lines changed

5 files changed

+27
-32
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
[submodule "deps/SpiderMonkey"]
2-
path = deps/SpiderMonkey
3-
url = https://github.com/ricardoquesada/Spidermonkey.git
4-
[submodule "deps/fbx-conv"]
5-
path = deps/fbx-conv
6-
url = https://github.com/Trace0429/fbx-conv

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,29 @@ pacman -S mingw-w64-i686-toolchain
6666
```
6767

6868
## How to use
69-
We have one build script for each platform, they are under `build` directory.
69+
We have one build script for each platform, it is under `build` directory.
7070

71-
All of them share the same usage:
71+
The usage would be:
7272

7373
```
74-
./build.sh -p=param0 --libs=param1 --arch=param2 --mode=param3 --list
74+
./build.sh -p=platform --libs=libs --arch=arch --mode=mode --list
7575
```
7676

77-
- param0: specify a platform, only (ios, mac, android, linux and tizen ) are valid values.
78-
- Note: This parameter is required each time when you run the script.
77+
- platform: specify a platform. Supported platforms: ios, mac, android, linux and tizen
7978

80-
- param1:
81-
- use `all` to build all the 3rd party libraries, it will take you a very long time.
82-
- use comma separated library names, for example, `png,lua,jpeg,webp`, no space between the comma.
79+
libs:
80+
- use `all` to build all the 3rd party libraries.
81+
- use comma separated library names, for example, `png,lua,jpeg,webp`, no space between the comma to select one or more libs
8382

84-
- param2:
85-
- use `all` to build all the supported arches. For iOS, they are "armv7, arm64, i386, x86_64", for Android, they are "arm,armv7,arm64,x86", for Mac, they are "x86_64", for Tizen, they are "armv7"
83+
arch:
84+
- use `all` to build all the supported architectures.
85+
- for iOS, they are "armv7, arm64, i386, x86_64"
86+
- for Android, they are "arm,armv7,arm64,x86"
87+
- for Mac, they are "x86_64"
88+
- for Tizen, they are "armv7"
8689
- use comma separated arch name, for example, `armv7, arm64`, no space between the comma.
8790

88-
- param3:
91+
- mode:
8992
- release: Build library on release mode. This is the default option. We use `-O3 -DNDEBUG` flags to build release library.
9093
- debug: Build library on debug mode. we use `-O0 -g -DDEBUG` flag to build debug library.
9194

build/build.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ if [ $cfg_platform_name = "android" ];then
171171
echo "Invalid gcc version number! Gcc version should be numerical numbers."
172172
usage
173173
exit 1
174-
fi
174+
fi
175175

176176
fi
177177

@@ -301,7 +301,7 @@ do
301301

302302
#set build mode flags -- debug or release
303303
set_build_mode_cflags
304-
304+
305305

306306
install_library_path="install-${cfg_platform_name}"
307307
build_library_path=$cfg_platform_name
@@ -313,7 +313,7 @@ do
313313
if [ -z $original_arch_name ];then
314314
original_arch_name=$arch
315315
fi
316-
316+
317317
MY_TARGET_ARCH=$original_arch_name
318318
export MY_TARGET_ARCH
319319

@@ -334,7 +334,7 @@ do
334334

335335
fi
336336

337-
337+
338338
mkdir -p "${top_dir}/contrib/${cfg_platform_name}-${arch}"
339339
cd "${top_dir}/contrib/${cfg_platform_name}-${arch}"
340340

@@ -350,20 +350,20 @@ do
350350
--host=${!my_target_host} \
351351
--prefix=${PREFIX}
352352

353-
353+
354354
echo "MY_TARGET_ARCH := ${MY_TARGET_ARCH}" >> config.mak
355355
echo "OPTIM := ${OPTIM}" >> config.mak
356-
356+
357357
make
358358

359-
cd -
360-
359+
cd -
360+
361361
local_library_install_path=$cfg_platform_name/$archive_name/prebuilt/$original_arch_name
362362
if [ ! -d $local_library_install_path ]; then
363363
echo "create folder for library with specify arch. $local_library_install_path"
364364
mkdir -p $local_library_install_path
365365
fi
366-
366+
367367
#determine the .a achive name with a specified libraries
368368
parse_original_lib_name=${lib}_original_name
369369
original_archive_name=${!parse_original_lib_name}
@@ -379,7 +379,7 @@ do
379379
original_dependent_archive_list=${!parse_dependent_archive_list}
380380
if [ ! -z $original_dependent_archive_list ];then
381381
echo "copying dependent archives..."
382-
original_dependent_archive_list=(${original_dependent_archive_list//,/ })
382+
original_dependent_archive_list=(${original_dependent_archive_list//,/ })
383383

384384
for dep_archive in ${original_dependent_archive_list[@]}
385385
do
@@ -405,18 +405,18 @@ do
405405

406406
echo $cfg_build_fat_library
407407
if [ $cfg_build_fat_library = "yes" ];then
408-
408+
409409
create_fat_library $archive_name
410410

411411
parse_dependent_archive_list=${lib}_dependent_archive_list
412412
original_dependent_archive_list=${!parse_dependent_archive_list}
413413
if [ ! -z $original_dependent_archive_list ];then
414414
echo "create fat library for dependent archives..."
415-
original_dependent_archive_list=(${original_dependent_archive_list//,/ })
415+
original_dependent_archive_list=(${original_dependent_archive_list//,/ })
416416

417417
for dep_archive in ${original_dependent_archive_list[@]}
418418
do
419-
create_fat_library $dep_archive
419+
create_fat_library $dep_archive
420420
done
421421
fi
422422
fi

deps/SpiderMonkey

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/fbx-conv

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)