Android NDK support and build system refactoring (#585)

This commit is contained in:
Nikolay Igotti
2017-05-24 00:20:19 +03:00
committed by GitHub
parent 48742b7f3f
commit 42197a2bec
26 changed files with 404 additions and 232 deletions
+1
View File
@@ -1,6 +1,7 @@
# HTTP client
This example shows how to communicate with libcurl, HTTP/HTTPS/FTP/etc client library.
Debian-like distros may need to `apt-get install libcurl4-openssl-dev`.
To build use `./build.sh` script without arguments (or specify `TARGET` variable if cross-compiling).
You also may use Gradle to build this sample: `../gradlew build`.
+2 -2
View File
@@ -4,7 +4,7 @@ PATH=../../dist/bin:../../bin:$PATH
DIR=.
CFLAGS_macbook=-I/opt/local/include
CFLAGS_linux=-I/usr/include
CFLAGS_linux=-I/usr/include/x86_64-linux-gnu
LINKER_ARGS_macbook="-L/opt/local/lib -lcurl"
LINKER_ARGS_linux="-L/usr/lib/x86_64-linux-gnu -lcurl"
@@ -23,5 +23,5 @@ LINKER_ARGS=${!var}
var=COMPILER_ARGS_${TARGET}
COMPILER_ARGS=${!var} # add -opt for an optimized build.
cinterop -copt "$CFLAGS" -copt -I. -def $DIR/libcurl.def -target $TARGET -o libcurl.bc || exit 1
cinterop -copt "$CFLAGS" -copt -I. -copt -I/usr/include -def $DIR/libcurl.def -target $TARGET -o libcurl.bc || exit 1
konanc -target $TARGET src -library libcurl.bc -linkerArgs "$LINKER_ARGS" -o Curl.kexe || exit 1