1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// This introduces the module type lights_cc_defaults
// If target.mk file contained:
//
// SOONG_CONFIG_NAMESPACES += lights
// SOONG_CONFIG_lights += lighttargets
// SOONG_CONFIG_lights_lighttargets := lightaidltarget
//
// Then ligets lib would build with shared_libs
soong_config_module_type {
name: "lights_cc_defaults",
module_type: "cc_defaults",
config_namespace: "lights",
variables: ["lighttargets"],
properties: ["shared_libs"],
}
soong_config_string_variable {
name: "lighttargets",
values: ["lightaidltarget", "lightaidlV1target"],
}
lights_cc_defaults {
name: "lights_defaults",
soong_config_variables: {
lighttargets: {
lightaidltarget: {
shared_libs: [
"android.hardware.light-ndk_platform",
],
},
lightaidlV1target: {
shared_libs: [
"android.hardware.light-V1-ndk_platform",
],
},
},
},
}
cc_binary {
name: "android.hardware.lights-service.qti",
defaults: ["lights_defaults"],
relative_install_path: "hw",
init_rc: ["android.hardware.lights-qti.rc"],
vintf_fragments: ["android.hardware.lights-qti.xml"],
vendor: true,
shared_libs: [
"libbase",
"liblog",
"libhardware",
"libbinder_ndk",
"android.hardware.light-V1-ndk_platform",
],
srcs: [
"Lights.cpp",
"main.cpp",
],
}
|