Search
lxdream.org :: lxdream/m4/android.m4 :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename m4/android.m4
changeset 1245:01e0020adf88
prev1239:be3121267597
next1255:d63f73cc586f
author nkeynes
date Fri Mar 02 23:49:10 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Android WIP:
* Rename gui_jni.c to gui_android.c - now quite android specific.
* Implement generic EGL driver with very minimal Java wrapper
* Run emulation in separate thread, and implement simple queue for
inter-thread communication.
* Add menu/action-bar items for start + reset
file annotate diff log raw
1.1 --- a/m4/android.m4 Sat Feb 25 21:30:49 2012 +1000
1.2 +++ b/m4/android.m4 Fri Mar 02 23:49:10 2012 +1000
1.3 @@ -6,7 +6,8 @@
1.4 AC_REQUIRE([AC_CANONICAL_HOST])
1.5 AC_ARG_WITH( android, AS_HELP_STRING( [--with-android=SDK], [Specify the location of the Android SDK] ) )
1.6 AC_ARG_WITH( android-ndk, AS_HELP_STRING( [--with-android-ndk=NDK], [Specify the location of the Android NDK] ) )
1.7 - AC_ARG_WITH( android-version, AS_HELP_STRING( [--with-android-version], [Specify target Android SDK version]), [], [with_android_version="android-8"] )
1.8 + AC_ARG_WITH( android-version, AS_HELP_STRING( [--with-android-version], [Specify target Android SDK version]), [], [with_android_version="android-11"] )
1.9 + AC_ARG_WITH( android-ndk-version, AS_HELP_STRING( [--with-android-version], [Specify target Android NDK version]), [], [with_ndk_version="android-9"] )
1.10
1.11 if test "x$with_android" != "x"; then
1.12 if test "$with_android" = "yes"; then
1.13 @@ -19,6 +20,7 @@
1.14 ANDROID_SDK_HOME="$with_android"
1.15 ANDROID_NDK_HOME="$with_android_ndk"
1.16 ANDROID_SDK_VERSION="$with_android_version"
1.17 + ANDROID_NDK_VERSION="$with_ndk_version"
1.18
1.19 AC_CHECK_FILE( [$ANDROID_SDK_HOME/tools/ant/pre_setup.xml], [], [ AC_MSG_ERROR([Android SDK not found in $ANDROID_SDK_HOME]) ])
1.20 AC_CHECK_FILE( [$ANDROID_SDK_HOME/platforms/$ANDROID_SDK_VERSION/sdk.properties], [], [ AC_MSG_ERROR([Android platform version $ANDROID_SDK_VERSION not found in $ANDROID_SDK_HOME]) ])
1.21 @@ -32,7 +34,7 @@
1.22 host_os="linux-androideabi"
1.23 ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/*/bin`
1.24 ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/arm-*/prebuilt/gdbserver`
1.25 - ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_SDK_VERSION/arch-arm"
1.26 + ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_NDK_VERSION/arch-arm"
1.27 TARGETFLAGS="-ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wno-psabi -Wa,--noexecstack"
1.28 TARGETFLAGS="$TARGETFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -mthumb -Os"
1.29 ;;
1.30 @@ -43,7 +45,7 @@
1.31 host_os="linux"
1.32 ANDROID_NDK_BIN=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/*/bin`
1.33 ANDROID_GDBSERVER=`echo $ANDROID_NDK_HOME/toolchains/x86-*/prebuilt/gdbserver`
1.34 - ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_SDK_VERSION/arch-x86"
1.35 + ANDROID_SYSROOT="$ANDROID_NDK_HOME/platforms/$ANDROID_NDK_VERSION/arch-x86"
1.36 TARGETFLAGS=""
1.37 ;;
1.38 *)
1.39 @@ -63,11 +65,12 @@
1.40 OBJDUMP="$ANDROID_NDK_BIN/${host_alias}-objdump"
1.41 CPPFLAGS="-fPIC --sysroot=$ANDROID_SYSROOT -I$ANDROID_SYSROOT/usr/include $TARGETFLAGS $CPPFLAGS"
1.42 LDFLAGS="-nostdlib -Wl,--no-undefined -L${ANDROID_SYSROOT}/usr/lib -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib -Wl,-allow-shlib-undefined -Wl,-z,noexecstack $LDFLAGS"
1.43 - LIBS="$LIBS -liconv -llog -lgcc -lc"
1.44 + LIBS="$LIBS -liconv -landroid -llog -lgcc -lc -lm"
1.45
1.46 AC_SUBST(ANDROID_SDK_HOME)
1.47 AC_SUBST(ANDROID_NDK_HOME)
1.48 AC_SUBST(ANDROID_SDK_VERSION)
1.49 + AC_SUBST(ANDROID_NDK_VERSION)
1.50 AC_SUBST(ANDROID_GDBSERVER)
1.51
1.52 ANDROID_BUILD=yes
.