1
0

Android.bp 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. //
  2. // Copyright © 2011-2012 Intel Corporation
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a
  5. // copy of this software and associated documentation files (the "Software"),
  6. // to deal in the Software without restriction, including without limitation
  7. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. // and/or sell copies of the Software, and to permit persons to whom the
  9. // Software is furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice (including the next
  12. // paragraph) shall be included in all copies or substantial portions of the
  13. // Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  18. // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21. // IN THE SOFTWARE.
  22. //
  23. subdirs = ["*"]
  24. build = ["Android.sources.bp"]
  25. cc_defaults {
  26. name: "libdrm_defaults",
  27. cflags: [
  28. // XXX: Consider moving these to config.h analogous to autoconf.
  29. "-DMAJOR_IN_SYSMACROS=1",
  30. "-DHAVE_VISIBILITY=1",
  31. "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1",
  32. "-Wall",
  33. "-Werror",
  34. "-Wno-deprecated-declarations",
  35. "-Wno-format",
  36. "-Wno-gnu-variable-sized-type-not-at-end",
  37. "-Wno-implicit-function-declaration",
  38. "-Wno-int-conversion",
  39. "-Wno-missing-field-initializers",
  40. "-Wno-pointer-arith",
  41. "-Wno-unused-parameter",
  42. "-Wno-unused-variable",
  43. ],
  44. export_system_include_dirs: ["."],
  45. }
  46. cc_library_headers {
  47. name: "libdrm_headers",
  48. vendor_available: true,
  49. host_supported: true,
  50. defaults: ["libdrm_defaults"],
  51. export_include_dirs: ["include/drm", "android"],
  52. apex_available: [
  53. "//apex_available:platform",
  54. "com.android.virt",
  55. ],
  56. }
  57. genrule {
  58. name: "generated_static_table_fourcc_h",
  59. out: ["generated_static_table_fourcc.h"],
  60. srcs: ["include/drm/drm_fourcc.h"],
  61. tool_files: ["gen_table_fourcc.py"],
  62. cmd: "python3 $(location gen_table_fourcc.py) $(in) $(out)",
  63. }
  64. // Library for the device
  65. cc_library {
  66. name: "libdrm",
  67. recovery_available: true,
  68. vendor_available: true,
  69. host_supported: true,
  70. defaults: [
  71. "libdrm_defaults",
  72. "libdrm_sources",
  73. ],
  74. generated_headers: [
  75. "generated_static_table_fourcc_h",
  76. ],
  77. export_include_dirs: ["include/drm", "android"],
  78. cflags: [
  79. "-Wno-enum-conversion",
  80. "-Wno-pointer-arith",
  81. "-Wno-sign-compare",
  82. "-Wno-tautological-compare",
  83. ],
  84. apex_available: [
  85. "//apex_available:platform",
  86. "com.android.virt",
  87. ],
  88. }