Android documentation
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1103 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
70e2afb9cc
commit
eb37483010
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -10,6 +10,7 @@ freeglut/freeglut/Makefile.am svn_keywords=Author+Date+Id+Revision
|
|||||||
freeglut/freeglut/Makefile.wat svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/Makefile.wat svn_keywords=Author+Date+Id+Revision
|
||||||
freeglut/freeglut/NEWS svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/NEWS svn_keywords=Author+Date+Id+Revision
|
||||||
freeglut/freeglut/README svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/README svn_keywords=Author+Date+Id+Revision
|
||||||
|
freeglut/freeglut/README.android -text
|
||||||
freeglut/freeglut/README.cygwin_mingw svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/README.cygwin_mingw svn_keywords=Author+Date+Id+Revision
|
||||||
freeglut/freeglut/README.mac -text
|
freeglut/freeglut/README.mac -text
|
||||||
freeglut/freeglut/README.mingw_cross svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/README.mingw_cross svn_keywords=Author+Date+Id+Revision
|
||||||
@ -49,6 +50,7 @@ freeglut/freeglut/VisualStudio/2010/subwin/subwin.vcxproj -text
|
|||||||
freeglut/freeglut/VisualStudio/2010/subwin/subwin.vcxproj.filters -text
|
freeglut/freeglut/VisualStudio/2010/subwin/subwin.vcxproj.filters -text
|
||||||
freeglut/freeglut/android/Android.mk -text
|
freeglut/freeglut/android/Android.mk -text
|
||||||
freeglut/freeglut/android/README -text
|
freeglut/freeglut/android/README -text
|
||||||
|
freeglut/freeglut/android_toolchain.cmake -text
|
||||||
freeglut/freeglut/autogen.sh svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/autogen.sh svn_keywords=Author+Date+Id+Revision
|
||||||
freeglut/freeglut/config.h.in svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/config.h.in svn_keywords=Author+Date+Id+Revision
|
||||||
freeglut/freeglut/configure.ac svn_keywords=Author+Date+Id+Revision
|
freeglut/freeglut/configure.ac svn_keywords=Author+Date+Id+Revision
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,6 +14,8 @@ freeglut/freeglut/config.status
|
|||||||
freeglut/freeglut/config.sub
|
freeglut/freeglut/config.sub
|
||||||
freeglut/freeglut/configure
|
freeglut/freeglut/configure
|
||||||
freeglut/freeglut/configure.scan
|
freeglut/freeglut/configure.scan
|
||||||
|
freeglut/freeglut/cross-android
|
||||||
|
freeglut/freeglut/cross-woe
|
||||||
freeglut/freeglut/debugfiles.list
|
freeglut/freeglut/debugfiles.list
|
||||||
freeglut/freeglut/debugsources.list
|
freeglut/freeglut/debugsources.list
|
||||||
freeglut/freeglut/depcomp
|
freeglut/freeglut/depcomp
|
||||||
@ -29,6 +31,7 @@ freeglut/freeglut/libtool
|
|||||||
freeglut/freeglut/ltmain.sh
|
freeglut/freeglut/ltmain.sh
|
||||||
freeglut/freeglut/man-pages
|
freeglut/freeglut/man-pages
|
||||||
freeglut/freeglut/missing
|
freeglut/freeglut/missing
|
||||||
|
freeglut/freeglut/native
|
||||||
freeglut/freeglut/progs/Makefile
|
freeglut/freeglut/progs/Makefile
|
||||||
freeglut/freeglut/progs/Makefile.in
|
freeglut/freeglut/progs/Makefile.in
|
||||||
freeglut/freeglut/progs/demos/CallbackMaker/.deps
|
freeglut/freeglut/progs/demos/CallbackMaker/.deps
|
||||||
|
61
freeglut/freeglut/README.android
Normal file
61
freeglut/freeglut/README.android
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
Create a module compatible with the NDK build-system
|
||||||
|
====================================================
|
||||||
|
|
||||||
|
- Use your own cross-compiler for Android, or export the one from the
|
||||||
|
NDK:
|
||||||
|
|
||||||
|
/usr/src/android-ndk-r7/build/tools/make-standalone-toolchain.sh \
|
||||||
|
--platform=android-9 \
|
||||||
|
--install-dir=/usr/src/ndk-standalone-9
|
||||||
|
|
||||||
|
- Build FreeGLUT with a '/freeglut' prefix :
|
||||||
|
|
||||||
|
PATH=/usr/src/ndk-standalone-9/bin:$PATH
|
||||||
|
cd /usr/src/freeglut-3.0.0/
|
||||||
|
cmake \
|
||||||
|
-D CMAKE_TOOLCHAIN_FILE=android_toolchain.cmake \
|
||||||
|
-D CMAKE_INSTALL_PREFIX=/freeglut \
|
||||||
|
-D FREEGLUT_GLES2=ON \
|
||||||
|
-D FREEGLUT_BUILD_DEMOS=NO \
|
||||||
|
.
|
||||||
|
make -j4
|
||||||
|
make install DESTDIR=$(pwd)
|
||||||
|
|
||||||
|
- Copy Android.mk in the new 'freeglut/' directory :
|
||||||
|
|
||||||
|
cp android/Android.mk freeglut/
|
||||||
|
|
||||||
|
- Reference this module in your jni/Android.mk:
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES := ... freeglut
|
||||||
|
...
|
||||||
|
$(call import-module,freeglut)
|
||||||
|
|
||||||
|
- You now can point your NDK_MODULE_PATH to this module!
|
||||||
|
|
||||||
|
ndk-build NDK_MODULE_PATH=/usr/src/freeglut-3.0.0/freeglut/
|
||||||
|
|
||||||
|
|
||||||
|
Compile FreeGLUT for a traditional cross-compiler environment
|
||||||
|
=============================================================
|
||||||
|
|
||||||
|
- Use your own cross-compiler for Android, or export the one from the
|
||||||
|
NDK:
|
||||||
|
|
||||||
|
/usr/src/android-ndk-r7/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
|
||||||
|
./configure --host=arm-linux-androideabi --prefix=/usr/src/ndk-standalone-9
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
- Compile your own project, for instance if you use the autotools:
|
||||||
|
|
||||||
|
PATH=/usr/src/ndk-standalone-9/bin:$PATH
|
||||||
|
./configure --host=arm-linux-androideabi --prefix=/somewhere
|
||||||
|
make
|
||||||
|
make install
|
6
freeglut/freeglut/android_toolchain.cmake
Normal file
6
freeglut/freeglut/android_toolchain.cmake
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# CMake toolchain file, cf. README.android
|
||||||
|
SET(CMAKE_SYSTEM_NAME Linux) # Tell CMake we're cross-compiling
|
||||||
|
include(CMakeForceCompiler)
|
||||||
|
# Prefix detection only works with compiler id "GNU"
|
||||||
|
CMAKE_FORCE_C_COMPILER(arm-linux-androideabi-gcc GNU)
|
||||||
|
SET(ANDROID TRUE)
|
Reference in New Issue
Block a user