-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathAndroid.bp
96 lines (86 loc) · 1.71 KB
/
Android.bp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Android.bp for the spi-tools project.
#
# Copyright 2025 Parsa Majidi ([email protected])
#
# License GPLv3+: This is free software: you are free to change and
# redistribute it.There is NO WARRANTY, to the extent permitted by law.
// spi-tools
genrule {
name: "generate_config_h",
srcs: [
"src/config.h.cmake.in"
],
out: [
"config.h"
],
cmd: "cp $(in) $(out)",
}
cc_library {
name: "spi-tools",
defaults: [
"spi_defaults",
],
generated_headers: [
"generate_config_h",
],
export_generated_headers: [
"generate_config_h",
],
}
cc_defaults {
name: "spi_defaults",
device_specific: true,
cpp_std: "gnu++17",
cflags: [
// You may want to edit this with the version from configure.ac of
// the release you are using.
"-DGPIOD_VERSION_STR=\"unstable\"",
],
cppflags: [
// Google C++ style is to not use exceptions, but this library does
// use them.
"-fexceptions",
],
// Google C++ style is to not use runtime type information, but this
// library does use it.
rtti: true,
}
//
// spi tools
//
phony {
name: "spi_tools",
required: [
"spi-config",
"spi-pipe",
],
}
cc_binary {
name: "spi-config",
defaults: [
"spi_defaults",
"spi_tools_defaults",
],
srcs: [
"src/spi-config.c",
],
}
cc_binary {
name: "spi-pipe",
defaults: [
"spi_defaults",
"spi_tools_defaults",
],
srcs: [
"src/spi-pipe.c",
],
}
cc_defaults {
name: "spi_tools_defaults",
srcs: [
"src/spi-tools.c",
],
shared_libs: [
"spi-tools",
],
}