Android.bp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright (C) 2018 The Android Open Source Project
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. aidl_interface {
  15. name: "ashmemd_aidl_interface",
  16. local_include_dir: "aidl",
  17. srcs: [
  18. "aidl/android/ashmemd/IAshmemDeviceService.aidl",
  19. ],
  20. }
  21. cc_defaults {
  22. name: "ashmemd_defaults",
  23. shared_libs: [
  24. "ashmemd_aidl_interface-cpp",
  25. "libbase",
  26. "libbinder",
  27. "libutils",
  28. ],
  29. cflags: [
  30. "-Wall",
  31. "-Werror",
  32. ],
  33. }
  34. cc_binary {
  35. name: "ashmemd",
  36. defaults: ["ashmemd_defaults"],
  37. srcs: ["ashmemd.cpp"],
  38. init_rc: ["ashmemd.rc"],
  39. }
  40. // This library is used to communicate with ashmemd using dlopen/dlsym. We do
  41. // this to avoid shared library dependecy cycles.
  42. cc_library {
  43. name: "libashmemd_client",
  44. defaults: ["ashmemd_defaults"],
  45. srcs: ["ashmemd_client.cpp"],
  46. cflags: [
  47. "-Wexit-time-destructors",
  48. "-fno-c++-static-destructors",
  49. ],
  50. }
  51. cc_test {
  52. name: "ashmemd_test",
  53. defaults: ["ashmemd_defaults"],
  54. srcs: ["tests/ashmemd_test.cpp"],
  55. test_suites: ["device-tests"],
  56. }