编译lib和头文件
cc_prebuilt_library_shared {
name: "lib***",
vendor: true,
export_include_dirs: ["include"],
target: {
android_arm64: {
srcs: ["lib64/libm***.so"],
},
},
strip: {
none:true,
}
}
编译可执行service
cc_binary {
name: "XXX",
defaults: ["hidl_defaults"],
proprietary: true,
init_rc: ["XXX.rc"],
srcs: [
"service.cpp",
],
include_dirs: [
""
],
cppflags: [
"-fexceptions",
"-Wno-unused-parameter",
"-D__LINUX__",
"-DCONFIG_DEBUG_LOG",
"-DFDBUS_PROTO_FULL_FEATURE"
],
cflags: [
"-Wno-unused-parameter",
"-D__LINUX__",
"-DCONFIG_DEBUG_LOG",
],
compile_multilib: "64",
shared_libs: [
"liblog",
],
static_libs: [
"[email protected]"
],
host_ldlibs: ["-llog"],
proto: {
type: "full",
},
}
cc_binary {
defaults: ["hidl_defaults"],
proprietary: true,
name: "XXX",
srcs: [
"test/main.cpp",
],
shared_libs: [
"liblog",
],
}
cc_library_static {
name: "",
vendor: true,
proto: {
export_proto_headers: true,
type: "full",
},
strip: {
keep_symbols: true,
},
cflags: [
"-Wall",
"-Werror",
],
srcs: [
]
}