1libvsomeip_srcs = [ 2 "implementation/endpoints/**/*.cpp", 3 "implementation/logging/**/*.cpp", 4 "implementation/tracing/**/*.cpp", 5 "implementation/message/**/*.cpp", 6 "implementation/routing/**/*.cpp", 7 "implementation/runtime/**/*.cpp", 8 "implementation/utility/**/*.cpp", 9 "implementation/plugin/**/*.cpp", 10 "implementation/security/**/*.cpp", 11 "implementation/logger/**/*.cpp", 12] 13 14libvsomeip_cfg_srcs = [ 15 "implementation/configuration/src/*.cpp", 16] 17 18libvsomeip_e2e_srcs = [ 19 "implementation/e2e_protection/src/*.cpp", 20] 21 22libvsomeip_sd_srcs = [ 23 "implementation/service_discovery/src/*.cpp", 24] 25 26cc_defaults { 27 name: "vsomeip_defaults", 28 29 header_libs: [ 30 "libboost_library_headers", 31 ], 32 33 local_include_dirs: [ 34 "interface", 35 "implementation/helper/1.76", 36 ], 37 38 rtti: true, 39 40 host_supported: true, 41 42 cppflags: [ 43 "-std=c++11", 44 "-fexceptions", 45 "-Wno-non-virtual-dtor", 46 "-Wno-unused-const-variable", 47 "-Wno-unused-parameter", 48 "-Wno-unused-private-field", 49 "-Wno-unused-lambda-capture", 50 "-Wno-unused-variable", 51 "-Wno-unused-local-typedef", 52 "-Wno-sign-compare", 53 "-Wno-format", 54 "-Wno-header-guard", 55 "-Wno-overloaded-virtual", 56 "-Wno-implicit-fallthrough", 57 "-Wno-macro-redefined", 58 ], 59 60 target: { 61 host_linux: { 62 cppflags: [ 63 // Soong is always adding -DANDROID even for the host 64 "-UANDROID", 65 "-DVSOMEIP_BASE_PATH=\"/tmp/\"", 66 ], 67 generated_headers: [ 68 "vsomeip_gen_internal_hpp", 69 ], 70 }, 71 android: { 72 cppflags: [ 73 "-DVSOMEIP_BASE_PATH=\"/data/\"", 74 ], 75 }, 76 }, 77} 78 79// Adapted from CMakeLists.txt 80gensrcs { 81 name: "vsomeip_gen_internal_hpp", 82 srcs: [ 83 "implementation/configuration/include/internal.hpp.in", 84 ], 85 cmd: "sed" + 86 " -e \"s|@DEFAULT_CONFIGURATION_FILE@|/etc/vsomeip.json|g\"" + 87 " -e \"s|@DEFAULT_CONFIGURATION_FOLDER@|/etc/vsomeip|g\"" + 88 " -e \"s|@VSOMEIP_MAJOR_VERSION@||g\"" + 89 " -e \"s|@VSOMEIP_DIAGNOSIS_ADDRESS@|0x01|g\"" + 90 " -e \"s|libvsomeip3-cfg\\.so\\.|libvsomeip3-cfg.so|g\"" + 91 " -e \"s|libvsomeip3-sd\\.so\\.|libvsomeip3-sd.so|g\"" + 92 " -e \"s|libvsomeip3-e2e\\.so\\.|libvsomeip3-e2e.so|g\"" + 93 " -e \"s|libvsomeip3-sec\\.so\\.|libvsomeip3-sec.so|g\"" + 94 " -e \"s|@VSOMEIP_UNICAST_ADDRESS@|127.0.0.1|g\"" + 95 " -e \"s|@VSOMEIP_ROUTING_READY_MESSAGE@|SOME/IP routing ready.|g\"" + 96 " $(in) > $(out) &&" + 97 " install $(out) external/sdv/vsomeip/implementation/configuration/include/internal.hpp", 98} 99 100cc_library_shared { 101 name: "libvsomeip3", 102 vendor: true, 103 104 srcs: libvsomeip_srcs, 105 106 defaults: [ 107 "vsomeip_defaults", 108 ], 109 110 cflags: [ 111 "-DWITHOUT_SYSTEMD", 112 ], 113 114 rtti: true, 115 116 local_include_dirs: [ 117 "interface", 118 "implementation/helper/1.76", 119 ], 120 121 export_include_dirs: [ 122 "interface", 123 ], 124 125 static_libs: [ 126 "libboost_system", 127 "libboost_thread", 128 "libboost_filesystem", 129 ], 130 131 shared_libs: [ 132 "liblog", 133 "libutils", 134 ], 135} 136 137cc_library_shared { 138 name: "libvsomeip3-cfg", 139 vendor: true, 140 141 srcs: libvsomeip_cfg_srcs, 142 143 defaults: [ 144 "vsomeip_defaults", 145 ], 146 147 rtti: true, 148 149 local_include_dirs: [ 150 "interface", 151 "implementation/helper/1.76", 152 ], 153 154 shared_libs: [ 155 "libvsomeip3", 156 "libboost_system", 157 "libboost_filesystem", 158 ], 159} 160 161cc_library_shared { 162 name: "libvsomeip3-e2e", 163 vendor: true, 164 165 srcs: libvsomeip_e2e_srcs, 166 167 defaults: [ 168 "vsomeip_defaults", 169 ], 170 171 rtti: true, 172 173 local_include_dirs: [ 174 "interface", 175 "implementation/helper/1.76", 176 ], 177 178 shared_libs: [ 179 "libvsomeip3", 180 "liblog", 181 ], 182} 183 184cc_library_shared { 185 name: "libvsomeip3-sd", 186 vendor: true, 187 188 srcs: libvsomeip_sd_srcs, 189 190 defaults: [ 191 "vsomeip_defaults", 192 ], 193 194 rtti: true, 195 196 local_include_dirs: [ 197 "interface", 198 "implementation/helper/1.76", 199 ], 200 201 shared_libs: [ 202 "libvsomeip3", 203 "liblog", 204 "libboost_thread", 205 ], 206} 207 208cc_defaults { 209 name: "vsomeip_example_defaults", 210 vendor: true, 211 owner: "ts", 212 host_supported: true, 213 shared_libs: [ 214 "libvsomeip3", 215 "liblog", 216 ], 217} 218 219cc_binary { 220 name: "vsomeip-helloworld-client", 221 defaults: ["vsomeip_example_defaults"], 222 223 srcs: [ 224 "examples/hello_world/hello_world_client_main.cpp", 225 ], 226} 227 228cc_binary { 229 name: "vsomeip-helloworld-service", 230 defaults: ["vsomeip_example_defaults"], 231 232 srcs: [ 233 "examples/hello_world/hello_world_service_main.cpp", 234 ], 235} 236 237cc_binary { 238 name: "vsomeip-notify-sample", 239 defaults: ["vsomeip_example_defaults"], 240 241 srcs: [ 242 "examples/notify-sample.cpp", 243 ], 244} 245 246cc_binary { 247 name: "vsomeip-request-sample", 248 defaults: ["vsomeip_example_defaults"], 249 250 srcs: [ 251 "examples/request-sample.cpp", 252 ], 253} 254 255cc_binary { 256 name: "vsomeip-response-sample", 257 defaults: ["vsomeip_example_defaults"], 258 259 srcs: [ 260 "examples/response-sample.cpp", 261 ], 262} 263 264cc_binary { 265 name: "vsomeip-subscribe-sample", 266 defaults: ["vsomeip_example_defaults"], 267 268 srcs: [ 269 "examples/subscribe-sample.cpp", 270 ], 271} 272