1 apk
include $(CLEAR_VARS)
LOCAL_MODULE := myapp
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
2 shared_library
- 生成的是动态库(.so 文件)
include $(CLEAR_VARS)
LOCAL_MODULE := mylibrary
LOCAL_SRC_FILES := mylibrary.cpp
include $(BUILD_SHARED_LIBRARY)
3 static_library
- 生成的是静态库(.a 文件)
include $(CLEAR_VARS)
LOCAL_MODULE := mylibrary
LOCAL_SRC_FILES := mylibrary.cpp
include $(BUILD_STATIC_LIBRARY)
4 java_binary
- 用于编译 Java 代码并生成可执行的 Java 程序(.jar 文件)
include $(CLEAR_VARS)
LOCAL_MODULE := mylibrary
LOCAL_SRC_FILES := $(call all-java-files-under, src)
include $(BUILD_JAVA_LIBRARY)
5 cc_binary
- 用于编译 C/C++ 代码并生成可执行的 C/C++ 程序
include $(CLEAR_VARS)
LOCAL_MODULE := myexecutable
LOCAL_SRC_FILES := myexecutable.cpp
include $(BUILD_EXECUTABLE)
文章来源地址https://www.toymoban.com/news/detail-784495.html
文章来源:https://www.toymoban.com/news/detail-784495.html
到了这里,关于Android.mk 常用模块类型的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!