Android.mk
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := NDKLIBRARY FILE_LIST := $(wildcard $(LOCAL_PATH)/src/SOIL2/*.c) FILE_LIST += $(wildcard $(LOCAL_PATH)/src/yuv/source/*.cc) $(warning FILE_LIST =============> $(FILE_LIST)) #添加跨平台源文件 LOCAL_SRC_FILES := $(FILE_LIST) #链接 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog LOCAL_LDLIBS += -lGLESv3 -lEGL -landroid #链接其他库 #LOCAL_SHARED_LIBRARIES := #libcutils #libutils #工作包含目录 LOCAL_C_INCLUDES += $(SYSROOT)\usr/include/ LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/SOIL2/ LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/yuv/include LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/yuv/include/libyuv $(warning 工作目录 $(LOCAL_PATH) 包含目录 $(LOCAL_C_INCLUDES)) #编译生成动态库 include $(BUILD_SHARED_LIBRARY) #编译生成静态库 #include $(BUILD_STATIC_LIBRARY)
Application.mk
APP_PLATFORM := android-18 #APP_ABI := all APP_ABI := armeabi-v7a #APP_ABI := armeabi APP_STL := c++_static APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -Wno-extern-c-compat APP_LDFLAGS := -latomic APP_SHORT_COMMANDS := true LOCAL_ALLOW_UNDEFINED_SYMBOLS := true #ifeq ($(NDK_DEBUG),1) # APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 # APP_OPTIM := debug #else # APP_CPPFLAGS += -DNDEBUG # APP_OPTIM := release #endif