Android std Android.mk && Application.mk

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

 

Android std Android.mk && Application.mk

上一篇:我是培训机构出身的程序员,不敢告诉任何人


下一篇:Nacos 2.0 正式发布,性能大幅提升 10 倍!