James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 1 | // Copyright 2017 The Android Open Source Project |
| 2 | |
| 3 | metricslogger_lib_src_files = [ |
| 4 | "metrics_logger.cpp", |
| 5 | ] |
| 6 | |
| 7 | cc_defaults { |
| 8 | name: "metricslogger_defaults", |
| 9 | |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 10 | 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 Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 21 | ], |
| 22 | } |
| 23 | |
| 24 | // metricslogger shared library |
| 25 | // ----------------------------------------------------------------------------- |
| 26 | cc_library_shared { |
| 27 | name: "libmetricslogger", |
| 28 | srcs: metricslogger_lib_src_files, |
| 29 | defaults: ["metricslogger_defaults"], |
| 30 | } |
| 31 | |
| 32 | // metricslogger shared library, debug |
| 33 | // ----------------------------------------------------------------------------- |
| 34 | cc_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 | // ----------------------------------------------------------------------------- |
| 48 | cc_test { |
| 49 | name: "metricslogger_tests", |
| 50 | defaults: ["metricslogger_defaults"], |
| 51 | shared_libs: [ |
| 52 | "libbase", |
| 53 | "libmetricslogger_debug", |
| 54 | ], |
James Hawkins | 7607adf | 2017-02-13 13:41:44 -0800 | [diff] [blame] | 55 | static_libs: ["libBionicGtestMain"], |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 56 | srcs: [ |
| 57 | "metrics_logger_test.cpp", |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 58 | ], |
| 59 | } |