1 2 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 32cc_defaults { 33 name: "pcre_defaults", 34 cflags: [ 35 "-DHAVE_CONFIG_H", 36 "-Wall", 37 "-Werror", 38 ], 39 tidy_checks: [ 40 "-google-build-using-namespace", 41 "-google-global-names-in-headers", 42 ], 43 local_include_dirs: [ 44 "include_internal", 45 "include", 46 ], 47 export_include_dirs: ["include"], 48} 49 50// === libpcre targets === 51 52cc_library { 53 name: "libpcre2", 54 defaults: ["pcre_defaults"], 55 host_supported: true, 56 vendor_available: true, 57 vndk: { 58 enabled: true, 59 }, 60 srcs: libpcre2_src_files, 61 target: { 62 linux_bionic: { 63 enabled: true, 64 }, 65 }, 66} 67 68// === libpcrecpp targets === 69 70cc_library_shared { 71 name: "libpcrecpp", 72 cflags: [ 73 "-Wall", 74 "-Werror", 75 "-Wno-unused-parameter", 76 "-Wno-unused-variable", 77 ], 78 tidy_checks: [ 79 "-google-build-using-namespace", 80 "-google-global-names-in-headers", 81 ], 82 local_include_dirs: ["pcrecpp/include"], 83 shared_libs: ["libpcre2"], 84 export_include_dirs: [ 85 "pcrecpp/include", 86 "include", 87 ], 88 srcs: [ 89 "pcrecpp/pcrecpp.cc", 90 "pcrecpp/pcre_scanner.cc", 91 "pcrecpp/pcre_stringpiece.cc", 92 ], 93} 94