Vova Sharaienko | 3aaf79b | 2023-01-13 20:51:30 +0000 | [diff] [blame] | 1 | |
| 2 | // |
| 3 | // Copyright (C) 2023 The Android Open Source Project |
| 4 | // |
| 5 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | // you may not use this file except in compliance with the License. |
| 7 | // You may obtain a copy of the License at |
| 8 | // |
| 9 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | // |
| 11 | // Unless required by applicable law or agreed to in writing, software |
| 12 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | // See the License for the specific language governing permissions and |
| 15 | // limitations under the License. |
| 16 | // |
| 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
| 21 | cc_library { |
| 22 | name: "libexpresslog", |
| 23 | srcs: [ |
| 24 | "Counter.cpp", |
| 25 | ], |
| 26 | cflags: [ |
| 27 | "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash", |
| 28 | "-Wall", |
| 29 | "-Werror", |
| 30 | ], |
| 31 | header_libs: [ |
| 32 | "libtextclassifier_hash_headers", |
| 33 | ], |
| 34 | static_libs: [ |
| 35 | "libstatslog_express", |
| 36 | "libtextclassifier_hash_static", |
| 37 | ], |
| 38 | shared_libs: [ |
| 39 | "libbase", |
| 40 | "libstatssocket", |
| 41 | ], |
| 42 | export_include_dirs: ["include"], |
| 43 | } |
| 44 | |
| 45 | genrule { |
| 46 | name: "statslog_express.h", |
| 47 | tools: ["stats-log-api-gen"], |
| 48 | cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_express.h --module expresslog --namespace android,expresslog", |
| 49 | out: [ |
| 50 | "statslog_express.h", |
| 51 | ], |
| 52 | } |
| 53 | |
| 54 | genrule { |
| 55 | name: "statslog_express.cpp", |
| 56 | tools: ["stats-log-api-gen"], |
| 57 | cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_express.cpp --module expresslog --namespace android,expresslog --importHeader statslog_express.h", |
| 58 | out: [ |
| 59 | "statslog_express.cpp", |
| 60 | ], |
| 61 | } |
| 62 | |
| 63 | cc_library_static { |
| 64 | name: "libstatslog_express", |
| 65 | generated_sources: ["statslog_express.cpp"], |
| 66 | generated_headers: ["statslog_express.h"], |
| 67 | export_generated_headers: ["statslog_express.h"], |
| 68 | shared_libs: [ |
| 69 | "libstatssocket", |
| 70 | ], |
| 71 | } |