Danilo's Tech Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 9 May 2013

How to compile libogg for Android

Posted on 12:04 by Unknown
To compile libogg for Android, you just need to create an appropriate jni/Android.mk makefile with the minimum set of files and options needed to compile libogg for Android.

  1. Download ogg from http://downloads.xiph.org/releases/ogg/ (for example I downloaded libogg-1.1.4.tar.gz)
  2. untar the file in your local directory:

    $ tar zxf libogg-1.1.4.tar.gz
  3. create a jni directory and put the following text into a file named jni/Android.mk:

    LOCAL_PATH := $(call my-dir)

    include $(CLEAR_VARS)
    LOCAL_MODULE    := ogg
    LOCAL_CFLAGS    := \
        -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT="" -UHAVE_CONFIG_H \
        -D_ANDROID
    LOCAL_C_INCLUDES := \
        ../libogg-1.1.4/include
    LOCAL_SRC_FILES := \
        ../libogg-1.1.4/src/bitwise.c \
        ../libogg-1.1.4/src/framing.c
    include $(BUILD_SHARED_LIBRARY)
  4.  Now your directory should look like the following:

    $ ls
    jni/  libogg-1.1.4/  libogg-1.1.4.tar.gz
  5. change directory to jni and run ndk-build:

    $ cd jni; ndk-build V=1
That should do it.
Read More
Posted in Android | No comments
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

Popular Posts

  • Problems with new version of rpmbuild
    The Problem With the new version of rpmbuild installed on CentOS 6.x, if you try to use an old RPM spec file, you will get an error like the...
  • Python For Android (Py4A)
    A better solution for cross-compiling Python for Android is to use the Py4A project which is made to be used together with SL4A (Scripting L...
  • Configuring the Apple Airport Extreme with Verizon FIOS
    I have Verizon FIOS triple-play service and I love the TV picture quality and internet speed and reliability, but I don't like Verizon...
  • Arduino and 7-segment LED counter driven by two tactile switches
    I have posted on YouTube a couple of videos about a project I made with the Arduino prototype board. The circuit uses an Arduino mini and ...
  • Welcome
    After many years of searching the web for tips and tricks about computers, operating systems and programming languages, it's finally tim...
  • How to cross-compile Python for Android
    When it comes to cross-compiling Python for Android, I've followed Gabriel's blog post @ http://mdqinc.com/blog/2011/09/cross-compil...
  • Transferring Files from a computer to your Android device
    Android devices have file systems similar to regular computers. Subject to permissions restrictions, we can transfer files from a computer t...
  • How to Cross-Compile libiconv for Android
    If your legacy C/C++ code includes <iconv.h> to convert the encoding of characters from one coded character set to another, and you ne...
  • Porting your Legacy C/C++ project to Android
    This is a recurring problem people have often: trying to port a big C/C++ project to the Android platform. You have thousands of lines of te...
  • Installing the Android NDK
    These instructions refer to a Ubuntu 12.04.1 LTS system running on an Intel processor. Head to the  http://developer.android.com/tools/sdk/n...

Categories

  • Android
  • Apple
  • Arduino
  • ARM
  • busybox
  • CentOS
  • DHCP
  • Fortran
  • GNU
  • GPON
  • iMac
  • Javascript
  • ksh
  • Linux
  • MacOSX
  • Mips
  • Network
  • Python
  • Router
  • UNIX
  • Windows
  • x86

Blog Archive

  • ▼  2013 (12)
    • ►  October (1)
    • ►  August (1)
    • ▼  May (1)
      • How to compile libogg for Android
    • ►  February (3)
    • ►  January (6)
  • ►  2012 (11)
    • ►  December (2)
    • ►  November (2)
    • ►  October (7)
Powered by Blogger.

About Me

Unknown
View my complete profile