Application.mk文件用到的配置项目:
APP_STL := gnustl_static
# Build with LLVM Clang3.1
#NDK_TOOLCHAIN_VERSION=clang3.3
# Build with ARM-Linux GCC4.8
NDK_TOOLCHAIN_VERSION=4.8
#Build with ARM-Linux GCC4.6
#NDK_TOOLCHAIN_VERSION=4.6
# Build only ARMv7-A machine code.
APP_ABI := armeabi-v7a
# 编译release版本
APP_OPTIM := release
Android.mk文件示例
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CPP_EXTENSION:=.cpp
LOCAL_CFLAGS +=-fvisibility=hidden
LOCAL_MODULE := SVGm
LOCAL_SRC_FILES := SVGm.cpp NXCGSVG.cpp
LOCAL_LDLIBS := -llog
LOCAL_LDLIBS += -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
编译FreeType库用到的mk文件
#FreeType库编译的mk文件
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ft2_static
LOCAL_MODULE_FILENAME := libft2
# compile in ARM mode, since the glyph loader/renderer is a hotspot
# when loading complex pages in the browser
#LOCAL_ARM_MODE := arm
LOCAL_CFLAGS += -D__LINUX_CPL__ -DANDROID_NDK -DUNICODE -DFT2_BUILD_LIBRARY
#LOCAL_CFLAGS += -fPIC -DPIC
#LOCAL_CFLAGS += "-DDARWIN_NO_CARBON"
#LOCAL_CFLAGS += "-DFT2_BUILD_LIBRARY"
LOCAL_SRC_FILES := \
src/base/ftsystem.c \
src/base/ftinit.c \
src/base/ftdebug.c \
src/base/ftbase.c \
src/base/ftbbox.c \
src/base/ftglyph.c \
src/base/ftbdf.c \
src/base/ftbitmap.c \
src/base/ftcid.c \
src/base/ftfstype.c \
src/base/ftgasp.c \
src/base/ftgxval.c \
src/base/ftlcdfil.c \
src/base/ftmm.c \
src/base/ftotval.c \
src/base/ftpatent.c \
src/base/ftpfr.c \
src/base/ftstroke.c \
src/base/ftsynth.c \
src/base/fttype1.c \
src/base/ftwinfnt.c \
src/base/ftxf86.c \
src/bdf/bdf.c \
src/cid/type1cid.c \
src/cff/cff.c \
src/pcf/pcf.c \
src/pfr/pfr.c \
src/sfnt/sfnt.c \
src/truetype/truetype.c \
src/type1/type1.c \
src/type42/type42.c \
src/winfonts/winfnt.c \
src/raster/raster.c \
src/smooth/smooth.c \
src/autofit/autofit.c \
src/cache/ftcache.c \
src/gzip/ftgzip.c \
src/lzw/ftlzw.c \
src/bzip2/ftbzip2.c \
src/gxvalid/gxvalid.c \
src/otvalid/otvalid.c \
src/psaux/psaux.c \
src/pshinter/pshinter.c \
src/psnames/psnames.c
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include \
$(LOCAL_PATH)/include/freetype
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_STATIC_LIBRARY)
#include $(BUILD_SHARED_LIBRARY)