1 Create a module compatible with the NDK build-system
2 ====================================================
4 - Use your own cross-compiler for Android, or export the one from the
7 /usr/src/android-ndk-r7/build/tools/make-standalone-toolchain.sh \
9 --install-dir=/usr/src/ndk-standalone-9
11 - Build FreeGLUT with a '/freeglut' prefix :
13 PATH=/usr/src/ndk-standalone-9/bin:$PATH
14 cd /usr/src/freeglut-3.0.0/
16 -D CMAKE_TOOLCHAIN_FILE=android_toolchain.cmake \
17 -D CMAKE_INSTALL_PREFIX=/freeglut \
18 -D FREEGLUT_GLES2=ON \
19 -D FREEGLUT_BUILD_DEMOS=NO \
22 make install DESTDIR=$(pwd)
24 - Copy Android.mk in the new 'freeglut/' directory :
26 cp android/Android.mk freeglut/
28 - Reference this module in your jni/Android.mk:
30 LOCAL_STATIC_LIBRARIES := ... freeglut
32 $(call import-module,freeglut)
34 - You now can point your NDK_MODULE_PATH to this module!
36 ndk-build NDK_MODULE_PATH=/usr/src/freeglut-3.0.0/freeglut/
39 Compile FreeGLUT for a traditional cross-compiler environment
40 =============================================================
42 - Use your own cross-compiler for Android, or export the one from the
45 /usr/src/android-ndk-r7/build/tools/make-standalone-toolchain.sh \
46 --platform=android-9 \
47 --install-dir=/usr/src/ndk-standalone-9
49 - Compile FreeGLUT and install it in your Android cross-compiler path:
51 PATH=/usr/src/ndk-standalone-9/bin:$PATH
52 ./configure --host=arm-linux-androideabi --prefix=/usr/src/ndk-standalone-9
56 - Compile your own project, for instance if you use the autotools:
58 PATH=/usr/src/ndk-standalone-9/bin:$PATH
59 ./configure --host=arm-linux-androideabi --prefix=/somewhere