在网站下载源代码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:Softcygwinhomemusictomandroidliblibogg-1.3.2srcitwise.c d:Softcygwinhomemusictomandroidliblibogg-1.3.2srcframing.c
LOCAL_CFLAGS += -Id:Softcygwinhomemusictomandroidliblibogg-1.3.2include
#LOCAL_SHARED_LIBRARIES :=
LOCAL_LDLIBS := -llog
#include $(BUILD_EXECUTABLE)
,在eclipse里点击project/build project,编译后会生成libs/armeabi/libogg.so