Skip to content

Commit c92b21b

Browse files
committed
use ndk-buid for building webp on Android platform
1 parent 83b5f77 commit c92b21b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

build/android.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ 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
4646
cfg_build_release_mode="-O3 -DNDEBUG "

contrib/src/webp/rules.mak

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ webp: libwebp-$(WEBP_VERSION).tar.gz .sum-webp
1515
$(MOVE)
1616

1717
.webp: webp
18+
ifdef HAVE_ANDROID
19+
cd $< && echo "APP_ABI:=$(MY_TARGET_ARCH)" >> Application.mk
20+
cd $< && ln -s $(shell pwd)/webp $(shell pwd)/webp/jni
21+
cd $< && ndk-build
22+
cd $< && cp obj/local/$(MY_TARGET_ARCH)/libwebp.a $(PREFIX)/lib/
23+
else
1824
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
1925
cd $< && $(MAKE)
2026
cd $< && $(MAKE) install
27+
endif
2128
touch $@

0 commit comments

Comments
 (0)