#projectconfig library
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := projectconfig
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
JAVAOPTFILEPATH := $(call local-intermediates-dir)
JAVAOPTFILE := $(JAVAOPTFILEPATH)/ProjectConfig.java
FEATUREOPTION_PATH := $(LOCAL_PATH)
$(JAVAOPTFILE): $(FEATUREOPTION_PATH)/javaoptgen.pl $(FEATUREOPTION_PATH)/DefaultConfig.pm device/reallytek/$(TARGET_DEVICE)/ProjectConfig.mk
$(hide) echo gen $@ ...
$(hide) perl $(FEATUREOPTION_PATH)/javaoptgen.pl $(FEATUREOPTION_PATH)/DefaultConfig.pm device/reallytek/$(TARGET_DEVICE)/ProjectConfig.mk $(JAVAOPTFILEPATH)
ALLJAVAOPTFILES := $(JAVAOPTFILE)
LOCAL_GENERATED_SOURCES += $(JAVAOPTFILE)
# Always use the latest prebuilt Android library.
LOCAL_SDK_VERSION := 19
include $(BUILD_JAVA_LIBRARY)
LOCAL_PATH:= $(call my-dir)
my-dir由编译系统提供,返回的是文件的当前路径
include $(CLEAR_VARS)
$ ( CLEAR _ VARS )指的是clear_vars.mk,脚本会清空所有LOCAL_xxx的变量,不影响后面这些变量的使用,除了LOCAL_PATH。我的理解是执行此.mk文件之前将上一次的.mk变量清空。
LOCAL_MODULE_TAGS := optional
取值范围有user debug eng tests optional等,optional表示该模块在所有版本下都编译
LOCAL_MODULE := projectconfig
生成的模块名,=$(LOCAL_PACKAGE_NAME),
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
指定编译之后放置的位置
include $(BUILD_JAVA_LIBRARY)
引入编译成可执行文件的规则