From 734d212ed4243d68b773f45a2ed24dfb82d12ddf Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Fri, 4 May 2012 11:19:00 +0000 Subject: [PATCH] Move Android docs to the website git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1298 7f0cb862-5218-0410-a997-914c9d46530a --- README.android | 82 +------------------------------------------------------- 1 file changed, 1 insertion(+), 81 deletions(-) diff --git a/README.android b/README.android index ec8b32d..439f85d 100644 --- a/README.android +++ b/README.android @@ -1,83 +1,3 @@ -Status -====== -See http://freeglut.sourceforge.net/docs/android.php + See http://freeglut.sourceforge.net/docs/android.php - -Compile FreeGLUT -================ - -- Use your own cross-compiler for Android, or export the one from the - Android NDK: - - /usr/src/android-ndk-r7c/build/tools/make-standalone-toolchain.sh \ - --platform=android-9 \ - --install-dir=/usr/src/ndk-standalone-9 - -- Compile FreeGLUT and install it in your Android cross-compiler path: - - PATH=/usr/src/ndk-standalone-9/bin:$PATH - cd /usr/src/freeglut-x.x/ - mkdir cross-android-gles2/ - cd cross-android-gles2/ - cmake \ - -D CMAKE_TOOLCHAIN_FILE=../android_toolchain.cmake \ - -D CMAKE_INSTALL_PREFIX=/usr/src/ndk-standalone-9/sysroot/usr \ - -D CMAKE_BUILD_TYPE=Debug \ - -D FREEGLUT_GLES2=ON \ - -D FREEGLUT_BUILD_DEMOS=NO \ - .. - make -j4 - make install - # Only static for now: - rm -f /usr/src/ndk-standalone-9/sysroot/usr/lib/libfreeglut-gles?.so* - - -Compile your own project using common build systems -=================================================== - -For instance if you use the autotools: - - PATH=/usr/src/ndk-standalone-9/bin:$PATH - export PKG_CONFIG_PATH=/usr/src/ndk-standalone-9/sysroot/usr/share/pkgconfig - ./configure --host=arm-linux-androideabi --prefix=/somewhere - make - make install - -If you use CMake, you may want to copy our Android toolchain -'android_toolchain.cmake': - - PATH=/usr/src/ndk-standalone-9/bin:$PATH - export PKG_CONFIG_PATH=/usr/src/ndk-standalone-9/sysroot/usr/share/pkgconfig - cp .../freeglut-x.x/android_toolchain.cmake . - mkdir cross-android/ - cd cross-android/ - cmake \ - -D CMAKE_TOOLCHAIN_FILE=../android_toolchain.cmake \ - -D CMAKE_INSTALL_PREFIX=/somewhere \ - -D CMAKE_BUILD_TYPE=Debug \ - -D MY_PROG_OPTION=something ... \ - .. - make -j4 - make install - - -Compile your own project using the NDK build-system -=================================================== - -- Create a module hierarchy pointing to FreeGLUT, with our Android.mk: - - mkdir freeglut-gles2/ - cp .../freeglut-x.x/android/gles2/Android.mk freeglut-gles2/ - ln -s /usr/src/ndk-standalone-9/sysroot/usr/include freeglut-gles2/include - ln -s /usr/src/ndk-standalone-9/sysroot/usr/lib freeglut-gles2/lib - -- Reference this module in your jni/Android.mk: - - LOCAL_STATIC_LIBRARIES := ... freeglut-gles2 - ... - $(call import-module,freeglut-gles2) - -- You now can point your NDK_MODULE_PATH to the directory containing the module: - - ndk-build NDK_MODULE_PATH=. -- 1.7.10.4