BUILD.bazel 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. load("//build/kernel/kleaf:kernel.bzl", "ddk_headers")
  2. package(
  3. default_visibility = [
  4. "//visibility:public",
  5. ],
  6. )
  7. ddk_headers(
  8. name = "spu_kernel_configs",
  9. hdrs = glob([
  10. "config/*.h"]),
  11. includes = ["config"]
  12. )
  13. ddk_headers(
  14. name = "spu_uapi_headers",
  15. hdrs = glob(["include/uapi/linux/*.h"]),
  16. includes = [
  17. "include/uapi/linux",
  18. ],
  19. )
  20. # Generated list with: find drivers -maxdepth 1 -mindepth 1 -type d -printf '"%p/**/*.h",\n'
  21. driver_header_globs = [
  22. "include/uapi/linux/*.h",
  23. ]
  24. # Generated list with: find drivers -type f -name '*.h' -printf '"%h",\n' | sort -u
  25. driver_includes = [
  26. "include",
  27. "include/uapi/linux",
  28. ]
  29. ddk_headers(
  30. name = "spu_src_headers",
  31. hdrs = glob(driver_header_globs),
  32. includes = driver_includes + [
  33. ".",
  34. ],
  35. )
  36. ddk_headers(
  37. name = "spu_headers",
  38. hdrs = [
  39. ":spu_src_headers",
  40. ":spu_uapi_headers",
  41. ":spu_kernel_configs",
  42. ],
  43. )
  44. load(":target.bzl", "define_pineapple")
  45. define_pineapple()