summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-06 21:07:21 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-06 21:07:21 +0800
commit782b4ebddb8c6ded2fedfbba6b996b5cbf0bbdb6 (patch)
tree2b393a46b3bc9ab69c708538d4d238b2257c6367 /README.md
parentce82c068c4278e2ff0131a7191ad606f262a11d6 (diff)
Update instructions
Diffstat (limited to 'README.md')
-rw-r--r--README.md67
1 files changed, 55 insertions, 12 deletions
diff --git a/README.md b/README.md
index a282e31..f37a767 100644
--- a/README.md
+++ b/README.md
@@ -7,50 +7,93 @@
```sh
$ git clone git://darapsa.org/libicclient.git
$ cd libicclient
+$ libtoolize
$ autoreconf --install
```
## Optionally setting environment values
-If, for example, on FreeBSD and using a previously set up arm64 Android standalone toolchain:
```sh
-$ setenv CFLAGS "-target aarch64-linux-android --sysroot=/usr/local/aarch64-linux-android/sysroot -I/usr/local/aarch64-linux-android/lib64/clang/7.0.2/include -L/usr/local/aarch64-linux-android/lib/gcc/aarch64-linux-android/4.9.x"
+$ export NDK=/opt/android-ndk-r19
+$ export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
```
-If debugging for Android:
+and then
+
```sh
-$ export CFLAGS="${CFLAGS} -g -DDEBUG -DANDROID"
-$ export LDFLAGS="${LDFLAGS} -llog"
+$ export TARGET=aarch64-linux-android
```
-and if for android_armv7:
+or
```sh
-$ export CFLAGS="${CFLAGS} -fPIC"
+$ export TARGET=armv7a-linux-androideabi
```
-## Configuring for various target hosts
+or
```sh
-$ ./configure
+$ export TARGET=i686-linux-android
```
or
```sh
-$ CC=/usr/local/aarch64-linux-android/bin/aarch64-linux-android-clang ./configure --host=aarch64-linux-android
+$ export TARGET=x86_64-linux-android
+```
+
+and then
+
+```sh
+$ export API=21
+$ export CC=$TOOLCHAIN/bin/$TARGET$API-clang
+```
+
+and only for Android 32-bit ARM, reset TARGET
+
+```sh
+$ export TARGET=arm-linux-androideabi
+```
+
+and then
+
+```sh
+$ export AR=$TOOLCHAIN/bin/$TARGET-ar
+$ export AS=$TOOLCHAIN/bin/$TARGET-as
+$ export LD=$TOOLCHAIN/bin/$TARGET-ld
+$ export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
+$ export STRIP=$TOOLCHAIN/bin/$TARGET-strip
+$ export PREFIX=$TOOLCHAIN/sysroot/usr
+```
+
+If debugging for Android:
+```sh
+$ export CPPFLAGS="$CPPFLAGS -DDEBUG -DANDROID"
+$ export CFLAGS="$CFLAGS -g"
+```
+
+If, for example, on FreeBSD and cross-compiling for arm64 Android relying on Linux binary compatibility:
+```sh
+$ setenv LDFLAGS "$LDFLAGS -L$PREFIX/lib/$TARGET/$API"
+```
+
+## Configuring for various target hosts
+
+```sh
+$ ./configure
```
or
```sh
-$ CC=/usr/local/arm-linux-androideabi/bin/arm-linux-androideabi-clang ./configure --host=arm-linux-androideabi
+$ ./configure --host=$TARGET --prefix=$PREFIX --libdir=$PREFIX/lib/$TARGET/$API --disable-static
```
or so on.
-## Compiling and linking
+## Compiling, linking, and installing
```sh
$ make # -jN (with N an integer number of parallel tasks you allow your computer to run for compiling this)
+$ sudo make install
```