Skip to content

Commit 357f7da

Browse files
committed
Merge pull request #35 from andyque/add-all-other-3rd-party-libs
Add all other 3rd party libs
2 parents 0078b24 + 5fb50c8 commit 357f7da

File tree

24 files changed

+1041
-20
lines changed

24 files changed

+1041
-20
lines changed

build/android.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ cfg_armv7_toolchain_bin="${ANDROID_NDK}/toolchains/arm-linux-androideabi-${cfg_d
3030

3131
#build arches and build libraries
3232
cfg_all_supported_arches=("arm" "armv7" "x86" "arm64")
33-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
33+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d")
3434
cfg_default_arches_all=("arm" "armv7" "x86")
35-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
35+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d")
3636

3737

3838
#whether build fat library, use lipo -S create
3939
cfg_build_fat_library=no
4040

4141
#whether use mthumb instruction or not
4242
#format cfg_${libname}_${archname}_use_mthumb
43-
cfg_curl_arm_use_mthumb=no
43+
cfg_curl_arm_use_mthumb=no #for compile issue
4444

4545
#debug and release mode flag
46-
cfg_build_release_mode="-O3 -DNDEBUG"
47-
cfg_build_debug_mode="-O0 -g -DDEBUG"
46+
cfg_build_release_mode="-O3 -DNDEBUG "
47+
cfg_build_debug_mode="-O0 -g -DDEBUG "
4848

build/build.sh

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,16 @@ function create_fat_library()
252252

253253
echo "create fat library lib$library_name for $all_static_libs"
254254
$LIPO -create $all_static_libs \
255-
-output $cfg_platform_name/$library_name/prebuilt/lib$library_name.a
255+
-output $cfg_platform_name/lib$library_name.a
256256

257257
# rm $all_static_libs
258258

259259
# remove debugging info don't strip
260260
# $STRIP -S $library_name/prebuilt/lib$library_name.a
261-
$LIPO -info $cfg_platform_name/$library_name/prebuilt/lib$library_name.a
261+
$LIPO -info $cfg_platform_name/lib$library_name.a
262+
263+
rm $all_static_libs
264+
rm -rf $cfg_platform_name/$library_name/prebuilt
262265
}
263266

264267

@@ -287,7 +290,7 @@ do
287290
fi
288291

289292

290-
mkdir -p $cfg_platform_name/$archive_name/include/
293+
# mkdir -p $cfg_platform_name/$archive_name/include/
291294

292295
for arch in "${build_arches[@]}"
293296
do
@@ -371,7 +374,8 @@ do
371374

372375
cd -
373376

374-
local_library_install_path=$cfg_platform_name/$archive_name/prebuilt/$original_arch_name
377+
local_library_install_path=$cfg_platform_name/$original_arch_name
378+
375379
if [ ! -d $local_library_install_path ]; then
376380
echo "create folder for library with specify arch. $local_library_install_path"
377381
mkdir -p $local_library_install_path
@@ -397,6 +401,9 @@ do
397401
for dep_archive in ${original_dependent_archive_list[@]}
398402
do
399403
local_library_install_path=$cfg_platform_name/${dep_archive}/prebuilt/$original_arch_name
404+
if [ $cfg_platform_name = "android"] || [ $cfg_platform_name = "linux" ];then
405+
local_library_install_path=$cfg_platform_name/$original_arch_name
406+
fi
400407
mkdir -p $local_library_install_path
401408
cp $top_dir/contrib/$install_library_path/$arch/lib/lib${dep_archive}.a $local_library_install_path/lib${dep_archive}.a
402409

@@ -405,8 +412,16 @@ do
405412

406413

407414
echo "Copying needed heder files"
415+
mkdir -p $cfg_platform_name/$arch/include/$archive_name
408416
copy_include_file_path=${lib}_header_files
409-
cp -r $top_dir/contrib/$install_library_path/$arch/include/${!copy_include_file_path} $cfg_platform_name/$archive_name/include
417+
src_directory=$top_dir/contrib/$install_library_path/$arch/include/${!copy_include_file_path}
418+
echo $src_directory
419+
destination_header_path=$cfg_platform_name/$arch/include/$archive_name/
420+
if [ -d $src_directory ];then
421+
cp -r $src_directory/* $destination_header_path
422+
else
423+
cp $src_directory $destination_header_path
424+
fi
410425

411426

412427
echo "cleaning up"

build/ios.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ cfg_armv7s_host_machine="arm-apple-darwin"
1414
cfg_arm64_host_machine="arm-apple-darwin"
1515

1616
cfg_all_supported_arches=("armv7" "armv7s" "i386" "arm64" "x86_64")
17-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
17+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d")
1818
cfg_default_arches_all=("armv7" "armv7s" "i386" "arm64" "x86_64")
19-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
19+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d")
2020

2121

2222
cfg_build_fat_library=yes

build/linux.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ cfg_i386_host_machine="i386-linux-gnu"
1717

1818

1919
cfg_all_supported_arches=("i386" "x86_64")
20-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
20+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d" "glfw")
2121
cfg_default_arches_all=("x86_64")
22-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
22+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d" "glfw")
2323

2424

2525
cfg_build_fat_library=no
26-
cfg_build_release_mode="-O3 -DNDEBUG"
27-
cfg_build_debug_mode="-O0 -g -DDEBUG"
26+
cfg_build_release_mode="-O3 -DNDEBUG "
27+
cfg_build_debug_mode="-O0 -g -DDEBUG "
2828

build/mac.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ cfg_is_cross_compile=no
2020

2121
#build arches and build libraries
2222
cfg_all_supported_arches=("i386" "x86_64")
23-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl")
23+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d")
2424
cfg_default_arches_all=("x86_64")
25-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl")
25+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "glfw" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d")
2626

2727

2828
#whether build fat library, use lipo -S create

build/main.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,25 @@ webp_header_files=webp
1414
websockets_header_files=libwebsockets.h
1515
zlib_header_files=z*.h
1616
chipmunk_header_files=chipmunk
17+
edtaa3func_header_files=edtaa3func.h
18+
xxhash_header_files=xxhash.h
19+
xxtea_header_files=xxtea.h
20+
convertutf_header_files=ConvertUTF.h
21+
flatbuffers_header_files=flatbuffers
22+
minizip_header_files=minizip
23+
tinyxml2_header_files=tinyxml2.h
24+
cjson_header_files=cjson
25+
luasocket_header_files=luasocket
26+
box2d_header_files=Box2D
27+
ssl_header_files=openssl
28+
glfw_header_files=GLFW
1729

1830

1931
##archive prebuilt name
2032
luajit_original_name=luajit-5.1
33+
box2d_original_name=Box2D
34+
flatbuffers_original_name=flatbuffer
35+
glfw_original_name=glfw3
2136

2237
##archive_alias
2338
zlib_archive_alias=z

build/tizen.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ cfg_armv7_toolchain_bin="${TIZEN_SDK}/tools/arm-linux-gnueabi-gcc-4.8/bin"
1919

2020
#build arches and build libraries
2121
cfg_all_supported_arches=("armv7")
22-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
22+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffer" "minizip" "tinyxml" "cjson" "luasocket")
2323
cfg_default_arches_all=("armv7")
24-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl")
24+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffer" "minizip" "tinyxml" "cjson" "luasocket")
2525

2626

2727
#whether build fat library, use lipo -S create

contrib/src/box2d/SHA512SUMS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dc63efa816a846b1e0413a49ffa67f8f88726a81f28b4cfadda50244763b5389ae96d379e4afef2d0ee87a2ffd132a5a344107b6eb0e11081e235d1c9e5ddad0 Box2D_v2.3.0.7z

contrib/src/box2d/rules.mak

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# box2d
2+
3+
BOX2D_VERSION := 2.3.0
4+
BOX2D_URL := https://github.com/andyque/Box2D.git
5+
6+
$(TARBALLS)/libbox2d-git.tar.xz:
7+
$(call download_git,$(BOX2D_URL),master)
8+
9+
.sum-box2d: libbox2d-git.tar.xz
10+
$(warning $@ not implemented)
11+
touch $@
12+
13+
box2d: libbox2d-git.tar.xz .sum-box2d
14+
$(UNPACK)
15+
$(MOVE)
16+
17+
18+
.box2d: box2d toolchain.cmake
19+
cd $</Box2D && $(HOSTVARS_PIC) $(CMAKE) . -DBOX2D_BUILD_EXAMPLES=0
20+
cd $</Box2D && $(MAKE) VERBOSE=1 install
21+
touch $@

0 commit comments

Comments
 (0)