Android.bp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // Copyright (C) 2016 The Android Open Source Project
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. bootstat_lib_src_files = [
  17. "boot_event_record_store.cpp",
  18. ]
  19. cc_defaults {
  20. name: "bootstat_defaults",
  21. cflags: [
  22. "-Wall",
  23. "-Wextra",
  24. "-Werror",
  25. ],
  26. shared_libs: [
  27. "libbase",
  28. "libcutils",
  29. "liblog",
  30. "libmetricslogger",
  31. ],
  32. }
  33. // bootstat static library
  34. // -----------------------------------------------------------------------------
  35. cc_library_static {
  36. name: "libbootstat",
  37. defaults: ["bootstat_defaults"],
  38. srcs: bootstat_lib_src_files,
  39. }
  40. // bootstat static library, debug
  41. // -----------------------------------------------------------------------------
  42. cc_library_static {
  43. name: "libbootstat_debug",
  44. defaults: ["bootstat_defaults"],
  45. host_supported: true,
  46. srcs: bootstat_lib_src_files,
  47. target: {
  48. host: {
  49. cflags: ["-UNDEBUG"],
  50. },
  51. },
  52. }
  53. // bootstat binary
  54. // -----------------------------------------------------------------------------
  55. cc_binary {
  56. name: "bootstat",
  57. defaults: ["bootstat_defaults"],
  58. static_libs: ["libbootstat"],
  59. shared_libs: [
  60. "libstatslog"
  61. ],
  62. init_rc: ["bootstat.rc"],
  63. product_variables: {
  64. pdk: {
  65. enabled: false,
  66. },
  67. debuggable: {
  68. init_rc: ["bootstat-debug.rc"],
  69. },
  70. },
  71. srcs: ["bootstat.cpp"],
  72. }
  73. // Native tests
  74. // -----------------------------------------------------------------------------
  75. cc_test {
  76. name: "bootstat_tests",
  77. test_suites: ["device-tests"],
  78. defaults: ["bootstat_defaults"],
  79. host_supported: true,
  80. static_libs: [
  81. "libbootstat_debug",
  82. "libgmock",
  83. ],
  84. srcs: [
  85. "boot_event_record_store_test.cpp",
  86. "testrunner.cpp",
  87. ],
  88. }