blob: a857554989d0f27f4bc730a6168b1518fa385f30 [file] [log] [blame]
Dan Willemsen66926142016-07-19 19:34:54 -07001
Janis Danisevskis53e448c2016-03-31 13:35:25 +01002
3libpcre2_dist_prefix = "dist2"
4
5libpcre2_src_files = [
6 libpcre2_dist_prefix + "/src/pcre2_auto_possess.c",
7 libpcre2_dist_prefix + "/src/pcre2_compile.c",
8 libpcre2_dist_prefix + "/src/pcre2_config.c",
9 libpcre2_dist_prefix + "/src/pcre2_context.c",
10 libpcre2_dist_prefix + "/src/pcre2_dfa_match.c",
11 libpcre2_dist_prefix + "/src/pcre2_error.c",
12 libpcre2_dist_prefix + "/src/pcre2_find_bracket.c",
13 libpcre2_dist_prefix + "/src/pcre2_maketables.c",
14 libpcre2_dist_prefix + "/src/pcre2_match.c",
15 libpcre2_dist_prefix + "/src/pcre2_match_data.c",
16 libpcre2_dist_prefix + "/src/pcre2_jit_compile.c",
17 libpcre2_dist_prefix + "/src/pcre2_newline.c",
18 libpcre2_dist_prefix + "/src/pcre2_ord2utf.c",
19 libpcre2_dist_prefix + "/src/pcre2_pattern_info.c",
20 libpcre2_dist_prefix + "/src/pcre2_serialize.c",
21 libpcre2_dist_prefix + "/src/pcre2_string_utils.c",
22 libpcre2_dist_prefix + "/src/pcre2_study.c",
23 libpcre2_dist_prefix + "/src/pcre2_substitute.c",
24 libpcre2_dist_prefix + "/src/pcre2_substring.c",
25 libpcre2_dist_prefix + "/src/pcre2_tables.c",
26 libpcre2_dist_prefix + "/src/pcre2_ucd.c",
27 libpcre2_dist_prefix + "/src/pcre2_valid_utf.c",
28 libpcre2_dist_prefix + "/src/pcre2_xclass.c",
29 libpcre2_dist_prefix + "/src/pcre2_chartables.c",
30]
31
Dan Willemsen66926142016-07-19 19:34:54 -070032cc_defaults {
33 name: "pcre_defaults",
Chih-Hung Hsieh65945542017-09-28 15:39:31 -070034 cflags: [
35 "-DHAVE_CONFIG_H",
36 "-Wall",
37 "-Werror",
38 ],
Chih-Hung Hsieh48eadb42017-08-09 15:30:45 -070039 tidy_checks: [
40 "-google-build-using-namespace",
41 "-google-global-names-in-headers",
42 ],
Janis Danisevskis53e448c2016-03-31 13:35:25 +010043 local_include_dirs: [
44 "include_internal",
45 "include",
Dan Willemsen66926142016-07-19 19:34:54 -070046 ],
Janis Danisevskis53e448c2016-03-31 13:35:25 +010047 export_include_dirs: ["include"],
Dan Willemsen66926142016-07-19 19:34:54 -070048}
49
Elliott Hughesf22fc772018-04-23 16:54:02 -070050//
51// libpcre2
52//
Dan Willemsen66926142016-07-19 19:34:54 -070053
54cc_library {
Janis Danisevskis53e448c2016-03-31 13:35:25 +010055 name: "libpcre2",
Dan Willemsen66926142016-07-19 19:34:54 -070056 defaults: ["pcre_defaults"],
57 host_supported: true,
Vijay Venkatramanf60d8432017-04-18 15:54:40 -070058 vendor_available: true,
Justin Yuncc36a0a2017-07-24 15:19:44 +090059 vndk: {
60 enabled: true,
61 },
Jiyong Park3bd078b2018-04-27 21:48:16 +090062 recovery_available: true,
Janis Danisevskis53e448c2016-03-31 13:35:25 +010063 srcs: libpcre2_src_files,
Dan Willemsen38109c92017-03-15 14:38:37 -070064 target: {
65 linux_bionic: {
66 enabled: true,
67 },
68 },
Dan Willemsen66926142016-07-19 19:34:54 -070069}
70
Elliott Hughesf22fc772018-04-23 16:54:02 -070071//
72// PCRE grep
73//
74
75cc_defaults {
76 name: "grep_common",
77 defaults: ["pcre_defaults"],
78 srcs: [libpcre2_dist_prefix + "/src/pcre2grep.c"],
79 shared_libs: ["libpcre2"],
80}
81
82cc_binary {
83 name: "grep",
84 defaults: ["grep_common"],
85}
86
87cc_binary {
88 name: "grep_vendor",
89 defaults: ["grep_common"],
90 stem: "grep",
91 vendor: true,
92}
93
94//
95// Google's C++ wrapper.
96//
Dan Willemsen66926142016-07-19 19:34:54 -070097
Janis Danisevskis4c7d77a2016-04-01 12:25:25 +010098cc_library_shared {
99 name: "libpcrecpp",
Chih-Hung Hsieh65945542017-09-28 15:39:31 -0700100 cflags: [
101 "-Wall",
102 "-Werror",
103 "-Wno-unused-parameter",
104 "-Wno-unused-variable",
105 ],
Chih-Hung Hsieh48eadb42017-08-09 15:30:45 -0700106 tidy_checks: [
107 "-google-build-using-namespace",
108 "-google-global-names-in-headers",
109 ],
Janis Danisevskis4c7d77a2016-04-01 12:25:25 +0100110 local_include_dirs: ["pcrecpp/include"],
111 shared_libs: ["libpcre2"],
112 export_include_dirs: [
113 "pcrecpp/include",
114 "include",
115 ],
116 srcs: [
117 "pcrecpp/pcrecpp.cc",
118 "pcrecpp/pcre_scanner.cc",
119 "pcrecpp/pcre_stringpiece.cc",
120 ],
121}