You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or you can also use `build.sh` script build each static library for different arch.
73
-
The usage would be:
73
+
- param1:
74
+
- use `all` to build all the 3rd party libraries, it will take you a very long time.
75
+
- use comma separated library names, for example, `png,lua,jpeg/webp`, no space between the comma.
74
76
75
-
```cpp
76
-
usage: $0 [-s] [-k sdk] [-a arch] [-l libname]
77
+
- param2:
78
+
- use `all` to build all the supported arches. For iOS, they are "armv7, arm64, i386, x86_64", for Android, they are "armeabi, armeabi-v7a, x86, arm64", for Mac, they are "x86_64", for Tizen, they are "armv7"
79
+
- use comma separated arch name, for example, `armv7, arm64`, no space between the comma.
77
80
78
-
OPTIONS
79
-
-k <sdk version> Specify which sdk to use ('xcodebuild -showsdks', current: 8.1)
80
-
-s Build for simulator
81
-
-a <arch> Specify which arch to use (current: armv7)
82
-
-l <libname> Specify which static library to build
83
-
```
81
+
- param3:
82
+
- release: Build library on release mode. This is the default option. We use `-O3 -DNDEBUG` flags to build release library.
83
+
- debug: Build library on debug mode. we use `-O0 -g -DDEBUG` flag to build debug library.
84
84
85
-
If you want to build *websockets* with *i386* arch, you could use the following command:
85
+
### For iOS Platform
86
+
For building libpng fat library with all arch x86_64, i386, armv7, arm64 on release mode:
86
87
87
88
```cpp
88
89
cd build/ios
89
-
./build.sh -s -a i386 -l websockets (Don't forget the -s option, it is stand for simulator, if you omit it, it will give you errors.)
90
+
./build.sh --libs=png
90
91
```
91
92
92
-
In this way, you can only build one arch a time, if you want to build a fat library, please use `build_xxx.sh` instead.(xxx is the library name, we will follow this conversion throughout this document.)
93
-
94
-
If you use `build_xxx.sh` to build static libraries, all the generated `header files` and `.a files` are under the folder named as `xxx`.
95
-
96
-
Let's give png as an example, after you run `./build_png.sh`, it will generate a folder named `png`:
93
+
After running this command, it will generate a folder named `png`:
97
94
98
95
The folder structure would be:
99
96
@@ -105,45 +102,21 @@ The folder structure would be:
105
102
106
103
All the other libraries share the same folder structure.
107
104
108
-
### For Android Platform
109
-
For building libpng with armeabi, armeabi-v7a and x86 arch, you can do it like this:
110
-
111
-
```cpp
112
-
cd build/android
113
-
./build_png.sh
114
-
```
115
-
Or you can also use `build.sh` script build each static library for different arch.
116
-
The usage would be:
105
+
For building libpng fat library with arch armv7 and arm64 on debug mode:
117
106
118
107
```cpp
119
-
-k <sdk> Use the specified Android API level (default: android-19)
120
-
-a <arch> Use the specified arch (default: armeabi-v7a)
If you want to build a `curl` library with `armeabi` arch support, you can do it like this:
127
-
128
-
```cpp
129
-
cd build/android
130
-
./build.sh -a armeabi -l curl
131
-
```
112
+
### For Android Platform
113
+
xxx document will be update later.
132
114
133
115
### For Mac
134
-
For building libpng x86_64 arch library:
116
+
xxx document will be update later.
135
117
136
-
```cpp
137
-
cd build/mac
138
-
./build_png.sh
139
-
```
140
118
### For Tizen
141
-
For building libpng armv7 arch library:
142
-
143
-
```cpp
144
-
cd build/tizen
145
-
./build_png.sh
146
-
```
119
+
xxx document will be update later.
147
120
148
121
### For Linux
149
122
xxx After testing these scripts on Linux, document will be update.
@@ -152,11 +125,12 @@ xxx After testing these scripts on Linux, document will be update.
152
125
xxx we need to improve the script to add debug and release options.
153
126
154
127
## How to do build clean?
155
-
If you use `./build_xxx.sh` to build static libraries, there is no need to do clean. After generating the static library, script will delete the intermediate files.
128
+
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.
156
129
157
-
If you use `./build.sh` manually, you should delete the folders generated in src folder.
158
130
159
131
## How to upgrade a existing library
160
132
If you find a 3rd party library has some critical bug fix, you might need to update it.
161
133
You can following the [README](./contrib/src/README) file to do this job.
0 commit comments