1.mk文件初识
当前目录的路径
LOCAL_PATH := $(call my-dir)
清除除了LOCALPATH的环境变量
include $(CLEAR_VARS)
编译生成的模块名称
LOCAL_MODULE := hello-jni
源文件 \ 连接符,连接文件
LOCAL_SRC_FILES := hello-jni.c \
hello.c
生成的文件位置
LOCAL_MODULE_PATH := $(LOCAL_PATH)
生成哪种类型的文件(二进制)
include $(BUILD_EXECUTABLE)
生成动态库
inclue $(BUILD_SHARED_LIBRARY)
生成静态库
inclue $(BUILD_STATIC_LIBRARY)
2.生成apk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
生成的apk名字
LOCAL_PACKAGE_NAME := LocalPackage
编译生成apk
include $(BUILD_PACKAGE)