David Ng | 8b728eb | 2018-05-03 19:36:14 -0700 | [diff] [blame] | 1 | cc_binary_host { |
| 2 | name: "unifdef", |
| 3 | srcs: ["scripts/unifdef.c"], |
| 4 | sanitize: { |
| 5 | never: true, |
Rishabh Bhatnagar | 6b33ac49 | 2019-11-12 18:58:00 -0800 | [diff] [blame] | 6 | }, |
| 7 | } |
| 8 | |
| 9 | gensrcs { |
| 10 | name: "gen-headers_install.sh", |
| 11 | srcs: ["scripts/headers_install.sh"], |
| 12 | tools: ["unifdef"], |
| 13 | cmd: "sed 's+scripts/unifdef+$(location unifdef)+g' $(in) > $(out)", |
| 14 | output_extension: "sh", |
| 15 | } |
| 16 | |
| 17 | cc_prebuilt_binary { |
| 18 | name: "headers_install.sh", |
| 19 | device_supported: false, |
| 20 | host_supported: true, |
| 21 | srcs: [":gen-headers_install.sh"], |
| 22 | } |
| 23 | |
| 24 | gensrcs { |
| 25 | name: "qcom-kernel-includes", |
| 26 | cmd: "$(location headers_install.sh) `dirname $(out)` `dirname $(in)` `basename $(in)`", |
| 27 | tools: ["headers_install.sh"], |
| 28 | export_include_dirs: ["include/uapi"], |
| 29 | srcs: [ |
| 30 | "include/uapi/**/*.h", |
| 31 | ], |
| 32 | output_extension: "h", |
David Ng | 8b728eb | 2018-05-03 19:36:14 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | gensrcs { |
| 36 | name: "qseecom-kernel-includes", |
Rishabh Bhatnagar | 6b33ac49 | 2019-11-12 18:58:00 -0800 | [diff] [blame] | 37 | cmd: "$(location headers_install.sh) `dirname $(out)` `dirname $(in)` `basename $(in)`", |
| 38 | tools: ["headers_install.sh"], |
David Ng | 8b728eb | 2018-05-03 19:36:14 -0700 | [diff] [blame] | 39 | export_include_dirs: ["include/uapi"], |
Rishabh Bhatnagar | 6b33ac49 | 2019-11-12 18:58:00 -0800 | [diff] [blame] | 40 | srcs: [ |
| 41 | "include/uapi/linux/qseecom.h", |
| 42 | ], |
David Ng | 8b728eb | 2018-05-03 19:36:14 -0700 | [diff] [blame] | 43 | output_extension: "h", |
| 44 | } |
| 45 | |
| 46 | cc_library_headers { |
| 47 | name: "qseecom-kernel-headers", |
| 48 | generated_headers: ["qseecom-kernel-includes"], |
| 49 | export_generated_headers: ["qseecom-kernel-includes"], |
| 50 | } |
Rishabh Bhatnagar | 6b33ac49 | 2019-11-12 18:58:00 -0800 | [diff] [blame] | 51 | |
| 52 | cc_library_headers { |
| 53 | name: "qcom_kernel_headers", |
| 54 | generated_headers: ["qcom-kernel-includes"], |
| 55 | export_generated_headers: ["qcom-kernel-includes"], |
| 56 | vendor: true, |
| 57 | recovery_available: true, |
| 58 | } |