Skip to content

Commit d1a62b4

Browse files
committed
makefile android fix curl dependencies
1 parent 165e0a3 commit d1a62b4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ else ifeq ($(PLATFORM),android)
8888
override ARCH := aarch64
8989
endif
9090

91+
SSL := $(BIN)/../sysroot/usr/lib/libssl.a
92+
CRYPTO := $(BIN)/../sysroot/usr/lib/libcrypto.a
93+
OPENSSL := $(BIN)/../sysroot/usr/include/openssl
94+
9195
CC = $(BIN)/$(ARCH)-linux-android26-clang
92-
CURL_CONFIG = --host $(ARCH)-$(HOST)-android26 --with-openssl=$$ANDROID_NDK/toolchains/llvm/prebuilt/$(HOST)-x86_64/sysroot/usr LIBS="-lssl -lcrypto" AR=$(BIN)/llvm-ar AS=$(BIN)/llvm-as CC=$(BIN)/$(ARCH)-linux-android26-clang CXX=$(BIN)/$(ARCH)-linux-android26-clang++ LD=$(BIN)/ld RANLIB=$(BIN)/llvm-ranlib STRIP=$(BIN)/llvm-strip
96+
CURL_CONFIG = --host $(ARCH)-$(HOST)-android26 --with-openssl=$(BIN)/../sysroot/usr LIBS="-lssl -lcrypto" AR=$(BIN)/llvm-ar AS=$(BIN)/llvm-as CC=$(BIN)/$(ARCH)-linux-android26-clang CXX=$(BIN)/$(ARCH)-linux-android26-clang++ LD=$(BIN)/ld RANLIB=$(BIN)/llvm-ranlib STRIP=$(BIN)/llvm-strip
9397
TARGET := $(DIST_DIR)/cloudsync.so
9498
LDFLAGS += -shared -lcrypto -lssl
9599
else ifeq ($(PLATFORM),ios)
@@ -173,7 +177,7 @@ ifneq ($(COVERAGE),false)
173177
genhtml $(COV_DIR)/coverage.info --output-directory $(COV_DIR)
174178
endif
175179

176-
openssl:
180+
$(SSL) $(CRYPTO) $(OPENSSL):
177181
git clone https://github.com/openssl/openssl.git $(CURL_DIR)/src/openssl
178182

179183
cd $(CURL_DIR)/src/openssl && \
@@ -184,7 +188,7 @@ openssl:
184188
make && make install_sw
185189

186190
ifeq ($(PLATFORM),android)
187-
$(CURL_LIB): openssl
191+
$(CURL_LIB): $(SSL) $(CRYPTO) $(OPENSSL)
188192
else
189193
$(CURL_LIB):
190194
endif

0 commit comments

Comments
 (0)