mirror of https://github.com/BOINC/boinc.git
android: Fix the example app compile on Android
This commit is contained in:
parent
4fd40b9c9c
commit
b96a79f005
|
@ -0,0 +1,11 @@
|
|||
# This should work on Linux. Modify as needed for other platforms.
|
||||
|
||||
PROGS = uc2
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
clean:
|
||||
rm $(PROGS) *.o
|
||||
|
||||
uc2: uc2.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o uc2 uc2.o $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a $(STDCPPTC)
|
|
@ -1,22 +1,24 @@
|
|||
#/bin/sh
|
||||
#script to compile Uppercase for Android
|
||||
#script to compile Wrapper for Android
|
||||
|
||||
export ANDROIDTC="$HOME/android-tc"
|
||||
export TCBINARIES="$ANDROIDTC/bin"
|
||||
export TCINCLUDES="$ANDROIDTC/arm-linux-androideabi"
|
||||
export TCSYSROOT="$ANDROIDTC/sysroot"
|
||||
export STDCPPTC="$TCINCLUDES/lib/libstdc++.a"
|
||||
export BOINC_DIR="../.."
|
||||
export BOINC_API_DIR="$BOINC_DIR/api"
|
||||
export BOINC_LIB_DIR="$BOINC_DIR/lib"
|
||||
export BOINC_ZIP_DIR="$BOINC_DIR/zip"
|
||||
|
||||
export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
|
||||
export CC=arm-linux-androideabi-gcc
|
||||
export CXX=arm-linux-androideabi-g++
|
||||
export LD=arm-linux-androideabi-ld
|
||||
export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
|
||||
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
|
||||
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
|
||||
export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -I$TCINCLUDES/include -I$BOINC_DIR -I$BOINC_LIB_DIR -I$BOINC_API_DIR -I$BOINC_ZIP_DIR"
|
||||
export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -L$BOINC_DIR -L$BOINC_LIB_DIR -L$BOINC_API_DIR -L$BOINC_ZIP_DIR -llog"
|
||||
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
|
||||
|
||||
# Prepare android toolchain and environment
|
||||
../../android/build_androidtc.sh
|
||||
|
||||
make
|
||||
make -f Makefile_android
|
||||
|
|
Loading…
Reference in New Issue