blob: 9803e87fe83d748f6d682d1a0b3531110c94fc08 [file] [log] [blame]
Garfield Tan6f23c362017-10-12 14:24:28 -07001// Copyright (C) 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badourdb41fce2021-02-12 14:52:32 -080015package {
16 default_applicable_licenses: ["external_libxkbcommon_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32// See: http://go/android-license-faq
33license {
34 name: "external_libxkbcommon_license",
35 visibility: [":__subpackages__"],
36 license_kinds: [
Yuichiro Hanadaa36f08b2022-04-21 21:57:38 +090037 "SPDX-license-identifier-BSD-3-Clause",
Bob Badourdb41fce2021-02-12 14:52:32 -080038 "SPDX-license-identifier-GPL",
39 "SPDX-license-identifier-GPL-2.0",
40 "SPDX-license-identifier-GPL-3.0",
41 "SPDX-license-identifier-ISC",
42 "SPDX-license-identifier-MIT",
43 "legacy_unencumbered",
44 ],
45 license_text: [
46 "LICENSE",
47 ],
48}
49
Garfield Tan6f23c362017-10-12 14:24:28 -070050cc_library_static {
51 srcs: [
Haibo Huang91f38392020-11-24 20:52:35 -080052 "config/libxkbcommon.so.0.0.0.p/parser.c",
Haibo Huangbffa8492020-09-08 17:10:03 -070053 "src/compose/parser.c",
54 "src/compose/paths.c",
55 "src/compose/state.c",
56 "src/compose/table.c",
57 "src/xkbcomp/action.c",
58 "src/xkbcomp/ast-build.c",
59 "src/xkbcomp/compat.c",
60 "src/xkbcomp/expr.c",
61 "src/xkbcomp/include.c",
62 "src/xkbcomp/keycodes.c",
63 "src/xkbcomp/keymap.c",
64 "src/xkbcomp/keymap-dump.c",
65 "src/xkbcomp/keywords.c",
Haibo Huangbffa8492020-09-08 17:10:03 -070066 "src/xkbcomp/rules.c",
67 "src/xkbcomp/scanner.c",
68 "src/xkbcomp/symbols.c",
69 "src/xkbcomp/types.c",
70 "src/xkbcomp/vmod.c",
71 "src/xkbcomp/xkbcomp.c",
72 "src/atom.c",
73 "src/context.c",
74 "src/context-priv.c",
Haibo Huangbffa8492020-09-08 17:10:03 -070075 "src/keymap.c",
76 "src/keymap-priv.c",
Yuichiro Hanadaa36f08b2022-04-21 21:57:38 +090077 "src/keysym.c",
78 "src/keysym-utf.c",
79 "src/registry.c",
Haibo Huangbffa8492020-09-08 17:10:03 -070080 "src/state.c",
81 "src/text.c",
82 "src/utf8.c",
Yuichiro Hanadaa36f08b2022-04-21 21:57:38 +090083 "src/util-list.c",
Haibo Huangbffa8492020-09-08 17:10:03 -070084 "src/utils.c",
Garfield Tan6f23c362017-10-12 14:24:28 -070085 ],
86 cflags: [
Yuichiro Hanadaa36f08b2022-04-21 21:57:38 +090087 "-std=c11",
88 "-fno-strict-aliasing",
89 "-fsanitize-undefined-trap-on-error",
Chih-Hung Hsieh87f9fcc2017-10-30 10:51:15 -070090 "-Wall",
91 "-Werror",
Yuichiro Hanadaa36f08b2022-04-21 21:57:38 +090092 "-Wno-format",
Garfield Tan6f23c362017-10-12 14:24:28 -070093 "-Wno-unused-parameter",
94 "-Wno-missing-field-initializers",
Tetsui Ohkubo531410e2019-01-17 11:12:41 +090095 // Needed because libxkbcommon uses GNU extension asprintf().
96 "-D_GNU_SOURCE",
Garfield Tan6f23c362017-10-12 14:24:28 -070097 ],
Yuichiro Hanadaa36f08b2022-04-21 21:57:38 +090098 static_libs: [
99 "libxml2"
100 ],
101 local_include_dirs: [
102 "src",
103 "config",
104 "config/libxkbcommon.so.0.0.0.p"
105 ],
106 export_include_dirs: ["include"],
Ben Lin9d961ef2018-04-25 10:17:51 -0700107 vendor_available: true,
Tetsui Ohkubo531410e2019-01-17 11:12:41 +0900108 host_supported: true,
Garfield Tan6f23c362017-10-12 14:24:28 -0700109 name: "libxkbcommon",
110}