Commit 2dbee1fa authored by Steffen Michels's avatar Steffen Michels

Merge branch 'android-lib-graphcopy' into 'master'

Added clean-graph-copy build script for Android ARM 32

See merge request clean-and-itasks/clean-build!5
parents a3665b01 3f8b673c
#!/bin/sh
. ./config.sh # Path to cross compilers
mkdir -p target/clean-lib-graphcopy
# Add clean libraries
mkdir -p target/clean-lib-graphcopy/lib/GraphCopy
cp -r src/clean-graph-copy/common/* target/clean-lib-graphcopy/lib/GraphCopy/
cp -r src/clean-graph-copy/linux/*.[id]cl target/clean-lib-graphcopy/lib/GraphCopy/
# Build c library
mkdir -p build/clean-graph-copy
cp -r src/clean-graph-copy/common build/clean-graph-copy/
cp -r src/clean-graph-copy/linux build/clean-graph-copy/
cp -r src/clean-graph-copy/arm32 build/clean-graph-copy/
cp -r src/clean-graph-copy/tools build/clean-graph-copy/
(cd build/clean-graph-copy/arm32
make -e CC=$CROSS_CC CFLAGS="$CROSS_CFLAGS" AS="$CROSS_AS" ASFLAGS="$CROSS_ASFLAGS"
)
cp -r build/clean-graph-copy/arm32/Clean\ System\ Files target/clean-lib-graphcopy/lib/GraphCopy/
rm -rf build
rm -rf target
rm -rf src
rm -rf dependencies
#!/bin/sh
export CC=/usr/bin/gcc
export AS=as
export LD=/usr/bin/ld
export CFLAGS=''
# Android
export NDK=$(pwd)/dependencies/android-ndk/android-ndk-r13b
export NDK_TOOLCHAIN=${NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=arm-linux-androideabi
export SYSROOT=${NDK}/platforms/android-21/arch-arm/
export CROSS_CC=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-gcc
export CROSS_AS=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-as
export CROSS_LD=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ld
export CROSS_CFLAGS="--sysroot=${SYSROOT} -pie -march=armv7-a -msoft-float -DPIC -DANDROID"
export CROSS_ASFLAGS="--defsym PIC=1"
export CROSS_LDFLAGS=""
#!/bin/sh
GIT=git
GIT_BASEURL="https://gitlab.science.ru.nl/clean-and-itasks"
mkdir -p src
rm -rf src/clean-graph-copy
$GIT clone $GIT_BASEURL/clean-graph-copy src/clean-graph-copy
if [ -n "${CLEANDATE+set}" ]; then
cd "src/clean-graph-copy"
$GIT checkout `$GIT rev-list -n 1 --before="$CLEANDATE" master`
fi
#!/bin/sh
cd target
tar -czf `date +clean-lib-graphcopy-android-arm32-%Y%m%d.tgz` clean-lib-graphcopy
#!/bin/sh
mkdir -p dependencies
# Android NDK
if [ ! -f "dependencies/ndk-r13b.zip" ]; then
curl -L -o dependencies/ndk-r13b.zip https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
fi
(cd dependencies
mkdir -p android-ndk
unzip ndk-r13b.zip -d ./android-ndk
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment