blob: 6549b8d56b07c636c973d6f9336f0f005cf30628 [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"],
14 shared_libs: ["liblog"],
15 whole_static_libs: ["libgtest_prod"],
16
17 cflags: [
18 "-Wall",
19 "-Wextra",
20 "-Werror",
James Hawkins9aec9262017-01-31 11:42:24 -080021 ],
22}
23
24// metricslogger shared library
25// -----------------------------------------------------------------------------
26cc_library_shared {
27 name: "libmetricslogger",
28 srcs: metricslogger_lib_src_files,
29 defaults: ["metricslogger_defaults"],
30}
31
32// metricslogger shared library, debug
33// -----------------------------------------------------------------------------
34cc_library_shared {
35 name: "libmetricslogger_debug",
36 srcs: metricslogger_lib_src_files,
37 defaults: ["metricslogger_defaults"],
38
39 target: {
40 host: {
41 cflags: ["-UNDEBUG"],
42 },
43 },
44}
45
46// Native tests
47// -----------------------------------------------------------------------------
48cc_test {
49 name: "metricslogger_tests",
50 defaults: ["metricslogger_defaults"],
51 shared_libs: [
52 "libbase",
53 "libmetricslogger_debug",
54 ],
James Hawkins7607adf2017-02-13 13:41:44 -080055 static_libs: ["libBionicGtestMain"],
James Hawkins9aec9262017-01-31 11:42:24 -080056 srcs: [
57 "metrics_logger_test.cpp",
James Hawkins9aec9262017-01-31 11:42:24 -080058 ],
59}