$ out/soong/host/linux-x86/bin/androidmk Android.mk > Android.bp
編譯成 Native 動態庫java
Android.mk include $(BUILD_SHARED_LIBRARY)
Android.bp cc_library_shared { ...... }
編譯成 Native 靜態庫linux
Android.mk include $(BUILD_STATIC_LIBRARY)
Android.bp cc_library_static { ...... }
編譯成 Native 執行程序android
Android.mk include $(BUILD_EXECUTABLE)
Android.bp cc_binary { ...... }
編譯成頭文件庫app
Android.mk include $(BUILD_HEADER_LIBRARY)
Android.bp cc_library_headers { ...... }
編譯成 Java 庫code
Android.mk include $(BUILD_JAVA_LIBRARY)
Android.bp java_library { ...... }
編譯成 Java 靜態庫ci
Android.mk include $(BUILD_STATIC_JAVA_LIBRARY)
Android.bp java_library_static { ...... }
編譯成 App 應用資源
Android.mk include $(BUILD_PACKAGE)
Android.bp android_app { ...... }
本地頭文件路徑編譯
Android.mk LOCAL_C_INCLUDES :=
Android.bp local_include_dirs: ["xxx", ...]
導出的頭文件路徑程序
Android.mk LOCAL_EXPORT_C_INCLUDE_DIRS :=
Android.bp export_include_dirs: ["xxx", ...]
資源文件路徑static
Android.mk LOCAL_RESOURCE_DIR :=
Android.bp resource_dirs: ["xxx", ...]
依賴的靜態庫
Android.mk LOCAL_STATIC_LIBRARIES :=
Android.bp static_libs: ["xxx", "xxx", ...]
依賴的動態庫
Android.mk LOCAL_SHARED_LIBRARIES :=
Android.bp shared_libs: ["xxx", "xxx", ...]
依賴的頭文件庫
Android.mk LOCAL_JAVA_LIBRARIES :=
Android.bp header_libs: ["xxx", "xxx", ...]
依賴的 Java 庫
Android.mk LOCAL_STATIC_LIBRARIES :=
Android.bp libs: ["xxx", "xxx", ...]
依賴的 Java 靜態庫
Android.mk LOCAL_STATIC_JAVA_LIBRARIES :=
Android.bp static_libs: ["xxx", "xxx", ...]
安裝到vendor中
Android.mk LOCAL_VENDOR_MODULE := true or LOCAL_PROPRIETARY_MODULE := true
Android.bp proprietary: true or vendor: true
安裝到product中
Android.mk LOCAL_PRODUCT_MODULE := true
Android.bp product_specific: true
安裝到odm中
Android.mk LOCAL_ODM_MODULE := true
Android.bp device_specific: true
C flags
Android.mk LOCAL_CFLAGS :=
Android.bp cflags: ["xxx", "xxx", ...]
Cpp flags
Android.mk LOCAL_CPPFLAGS :=
Android.bp cppflags: ["xxx", "xxx", ...]
Java flags
Android.mk LOCAL_JAVACFLAGS :=
Android.bp javacflags: ["xxx", "xxx", ...]