在网站下载源代码http://www.xiph.org/downloads/
解压然后打开cygwin配置
CXX=arm-linux-androideabi-g++.exe LD=arm-linux-androideabi-ld.exe AR=arm-linux-androideabi-ar.exe RANLIB=arm-linux-androideabi-ranlib.exe ./configure --prefix=/usr/local/
然后,android.mk的写法
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := demo
LOCAL_SRC_FILES := demo.cpp
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := ogg
LOCAL_SRC_FILES := d:\Soft\cygwin\home\musictom\androidlib\libogg-1.3.2\src\bitwise.c d:\Soft\cygwin\home\musictom\androidlib\libogg-1.3.2\src\framing.c
LOCAL_CFLAGS += -Id:\Soft\cygwin\home\musictom\androidlib\libogg-1.3.2\include
#LOCAL_SHARED_LIBRARIES :=
LOCAL_LDLIBS := -llog
#include $(BUILD_EXECUTABLE)
,在eclipse里点击project/build project,编译后会生成libs/armeabi/libogg.so