blob: 7d7554b43882d6f121de2ad30b1f0f31199b23fd [file] [log] [blame]
James Hawkins9aec9262017-01-31 11:42:24 -08001// Copyright 2017 The Android Open Source Project
2
3metricslogger_lib_src_files = [
4 "metrics_logger.cpp",
5]
6
7cc_defaults {
8 name: "metricslogger_defaults",
9
James Hawkins9aec9262017-01-31 11:42:24 -080010 host_supported: true,
11
12 export_include_dirs: ["include"],
13 local_include_dirs: ["include"],
Howard Ro34bc5672018-10-15 21:42:34 -070014 shared_libs: [
15 "libbase",
16 "liblog",
17 "libstatssocket",
18 ],
James Hawkins9aec9262017-01-31 11:42:24 -080019 whole_static_libs: ["libgtest_prod"],
20
21 cflags: [
22 "-Wall",
23 "-Wextra",
24 "-Werror",
James Hawkins9aec9262017-01-31 11:42:24 -080025 ],
26}
27
28// metricslogger shared library
29// -----------------------------------------------------------------------------
Howard Ro34bc5672018-10-15 21:42:34 -070030cc_library {
James Hawkins9aec9262017-01-31 11:42:24 -080031 name: "libmetricslogger",
32 srcs: metricslogger_lib_src_files,
33 defaults: ["metricslogger_defaults"],
Howard Ro34bc5672018-10-15 21:42:34 -070034 export_shared_lib_headers: ["libstatssocket"],
James Hawkins9aec9262017-01-31 11:42:24 -080035}
36
37// metricslogger shared library, debug
38// -----------------------------------------------------------------------------
39cc_library_shared {
40 name: "libmetricslogger_debug",
41 srcs: metricslogger_lib_src_files,
42 defaults: ["metricslogger_defaults"],
43
44 target: {
45 host: {
46 cflags: ["-UNDEBUG"],
47 },
48 },
49}
50
51// Native tests
52// -----------------------------------------------------------------------------
53cc_test {
54 name: "metricslogger_tests",
Christopher Ferris805ea832018-08-22 12:40:32 -070055 isolated: true,
James Hawkins9aec9262017-01-31 11:42:24 -080056 defaults: ["metricslogger_defaults"],
57 shared_libs: [
58 "libbase",
59 "libmetricslogger_debug",
60 ],
61 srcs: [
62 "metrics_logger_test.cpp",
James Hawkins9aec9262017-01-31 11:42:24 -080063 ],
64}