Skip to content

Commit 2344835

Browse files
committed
improve the document
1 parent 560df89 commit 2344835

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ We have one build script for each platform, they are under `build/platform{ios/m
7171
All of them share the same usage:
7272

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

77+
- param0: specify a platform, only (ios, mac, android, linux and tizen ) are valid values.
78+
7779
- param1:
7880
- use `all` to build all the 3rd party libraries, it will take you a very long time.
7981
- use comma separated library names, for example, `png,lua,jpeg,webp`, no space between the comma.
@@ -89,12 +91,12 @@ All of them share the same usage:
8991
- list:
9092
- Use these option to list all the supported libraries.
9193

92-
### For iOS Platform
94+
### Build png on iOS platform
9395
For building libpng fat library with all arch x86_64, i386, armv7, arm64 on release mode:
9496

9597
```
9698
cd build/ios
97-
./build.sh --libs=png
99+
./build.sh -p=ios --libs=png
98100
```
99101

100102
After running this command, it will generate a folder named `png`:
@@ -113,23 +115,23 @@ For building libpng fat library with arch armv7 and arm64 on debug mode:
113115

114116
```
115117
cd build/ios
116-
./build.sh --libs=png --arch=armv7,arm64 --mode=debug
118+
./build.sh -p=ios --libs=png --arch=armv7,arm64 --mode=debug
117119
```
118120

119-
### For Android Platform
120-
xxx document will be update later.
121+
### Build for Android arm64
122+
123+
1. Download Android NDK r10c and set the ANDROID_NDK to point to the Android ndk r10c path. Don't forget to `source ~/.bash_profile`.
124+
125+
2. Modify the android.ini config file. Change `cfg_default_build_api=21` and `cfg_default_gcc_version=4.9`.
126+
127+
3. Pass `--arch=64` to build the libraries with arm64 support.
121128

122-
### For Mac
123-
xxx document will be update later.
124129

125-
### For Tizen
126-
xxx document will be update later.
130+
For other platforms and other libraries, it is more or less the same way except for some minor changes in `--arch` parameter and `-p` parameter.
127131

128-
### For Linux
129-
xxx After testing these scripts on Linux, document will be update.
130132

131133
## How to build a DEBUG and RELEASE version
132-
xxx we need to improve the script to add debug and release options.
134+
You can add flag "--mode=[debug | release]" for building DEBUG and RELEASE version.
133135

134136
## How to do build clean?
135137
If you use `./build.sh` to build static libraries, there is no need to do clean. After generating the static library, script will delete the intermediate files.

build/main.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ zlib_archive_alias=z
1818
freetype2_archive_alias=freetype
1919

2020
#clean up flag
21-
cfg_is_cleanup_after_build=no
21+
cfg_is_cleanup_after_build=yes
2222

2323
##valide options
2424
cfg_valid_build_mode=(release debug)

0 commit comments

Comments
 (0)