librtclient
C library for accessing Request Tracker's REST 1.0 interface

Building

Getting and preparing for configuration

$ git clone git://darapsa.org/librtclient.git
$ cd librtclient
$ libtoolize
$ autoreconf --install

Optionally setting environment values

$ export ANDROID_NDK_ROOT=/opt/android-ndk-r19
$ export TOOLCHAIN=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64

and then

$ export TARGET=aarch64-linux-android

or

$ export TARGET=armv7a-linux-androideabi

or

$ export TARGET=i686-linux-android

or

$ export TARGET=x86_64-linux-android

and then

$ export API=21
$ export CC=$TOOLCHAIN/bin/$TARGET$API-clang

and only for Android 32-bit ARM, reset TARGET

$ export TARGET=arm-linux-androideabi

and then

$ 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:

$ 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:

$ setenv LDFLAGS "$LDFLAGS -L$PREFIX/lib/$TARGET/$API"

Configuring for various target hosts

$ ./configure

or

$ ./configure --host=$TARGET --prefix=$PREFIX --libdir=$PREFIX/lib/$TARGET/$API --disable-static

or so on.

Compiling, linking, and installing

$ make # -jN (with N an integer number of parallel tasks you allow your computer to run for compiling this)
$ sudo make install