BUILD.bazel 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. "include/uapi",
  19. ],
  20. )
  21. # Generated list with: find drivers -maxdepth 1 -mindepth 1 -type d -printf '"%p/**/*.h",\n'
  22. driver_header_globs = [
  23. "include/uapi/linux/*.h",
  24. ]
  25. # Generated list with: find drivers -type f -name '*.h' -printf '"%h",\n' | sort -u
  26. driver_includes = [
  27. "include",
  28. "include/uapi/linux",
  29. ]
  30. ddk_headers(
  31. name = "spu_src_headers",
  32. hdrs = glob(driver_header_globs),
  33. includes = driver_includes + [
  34. ".",
  35. ],
  36. )
  37. ddk_headers(
  38. name = "spu_headers",
  39. hdrs = [
  40. ":spu_src_headers",
  41. ":spu_uapi_headers",
  42. ":spu_kernel_configs",
  43. ],
  44. )
  45. load(":target.bzl", "define_modules")
  46. targets = ["pineapple", "niobe"]
  47. define_modules(targets)