xref: /aosp_15_r20/external/google-fruit/Android.bp (revision a65addddcf69f38db5b288d787b6b7571a57bb8f)
1*a65addddSAndroid Build Coastguard Worker// Copyright (C) 2018 The Android Open Source Project
2*a65addddSAndroid Build Coastguard Worker//
3*a65addddSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*a65addddSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*a65addddSAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*a65addddSAndroid Build Coastguard Worker//
7*a65addddSAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*a65addddSAndroid Build Coastguard Worker//
9*a65addddSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*a65addddSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*a65addddSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*a65addddSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*a65addddSAndroid Build Coastguard Worker// limitations under the License.
14*a65addddSAndroid Build Coastguard Worker
15*a65addddSAndroid Build Coastguard Worker// Simply '#include <fruit/fruit.h>' to get started.
16*a65addddSAndroid Build Coastguard Worker// See https://github.com/google/fruit/wiki for more details.
17*a65addddSAndroid Build Coastguard Workerpackage {
18*a65addddSAndroid Build Coastguard Worker    default_applicable_licenses: ["external_google-fruit_license"],
19*a65addddSAndroid Build Coastguard Worker}
20*a65addddSAndroid Build Coastguard Worker
21*a65addddSAndroid Build Coastguard Worker// Added automatically by a large-scale-change
22*a65addddSAndroid Build Coastguard Worker//
23*a65addddSAndroid Build Coastguard Worker// large-scale-change included anything that looked like it might be a license
24*a65addddSAndroid Build Coastguard Worker// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
25*a65addddSAndroid Build Coastguard Worker//
26*a65addddSAndroid Build Coastguard Worker// Please consider removing redundant or irrelevant files from 'license_text:'.
27*a65addddSAndroid Build Coastguard Worker// See: http://go/android-license-faq
28*a65addddSAndroid Build Coastguard Workerlicense {
29*a65addddSAndroid Build Coastguard Worker    name: "external_google-fruit_license",
30*a65addddSAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
31*a65addddSAndroid Build Coastguard Worker    license_kinds: [
32*a65addddSAndroid Build Coastguard Worker        "SPDX-license-identifier-Apache-2.0",
33*a65addddSAndroid Build Coastguard Worker    ],
34*a65addddSAndroid Build Coastguard Worker    license_text: [
35*a65addddSAndroid Build Coastguard Worker        "COPYING",
36*a65addddSAndroid Build Coastguard Worker        "LICENSE",
37*a65addddSAndroid Build Coastguard Worker    ],
38*a65addddSAndroid Build Coastguard Worker}
39*a65addddSAndroid Build Coastguard Worker
40*a65addddSAndroid Build Coastguard Workercc_library {
41*a65addddSAndroid Build Coastguard Worker    name: "libfruit",
42*a65addddSAndroid Build Coastguard Worker    host_supported: true,
43*a65addddSAndroid Build Coastguard Worker    vendor_available: true,
44*a65addddSAndroid Build Coastguard Worker    export_include_dirs: [
45*a65addddSAndroid Build Coastguard Worker        "include",
46*a65addddSAndroid Build Coastguard Worker        "configuration/android",
47*a65addddSAndroid Build Coastguard Worker    ],
48*a65addddSAndroid Build Coastguard Worker    srcs: ["src/**/*.cpp"],
49*a65addddSAndroid Build Coastguard Worker    apex_available: [
50*a65addddSAndroid Build Coastguard Worker        "//apex_available:platform",
51*a65addddSAndroid Build Coastguard Worker        "//apex_available:anyapex",
52*a65addddSAndroid Build Coastguard Worker    ],
53*a65addddSAndroid Build Coastguard Worker}
54*a65addddSAndroid Build Coastguard Worker
55*a65addddSAndroid Build Coastguard Worker// TODO: tests written in python+pytest that calls back into compiler. unclear how to best proceed.
56*a65addddSAndroid Build Coastguard Worker
57*a65addddSAndroid Build Coastguard Workercc_defaults {
58*a65addddSAndroid Build Coastguard Worker    name: "libfruit-example-defaults",
59*a65addddSAndroid Build Coastguard Worker    host_supported: true,
60*a65addddSAndroid Build Coastguard Worker    gtest: false,
61*a65addddSAndroid Build Coastguard Worker    shared_libs: ["libfruit"],
62*a65addddSAndroid Build Coastguard Worker    cflags: ["-Wno-non-virtual-dtor"],
63*a65addddSAndroid Build Coastguard Worker}
64*a65addddSAndroid Build Coastguard Worker
65*a65addddSAndroid Build Coastguard Workercc_test {
66*a65addddSAndroid Build Coastguard Worker    defaults: ["libfruit-example-defaults"],
67*a65addddSAndroid Build Coastguard Worker    name: "libfruit-example-hello-world",
68*a65addddSAndroid Build Coastguard Worker    srcs: ["examples/hello_world/**/*.cpp"],
69*a65addddSAndroid Build Coastguard Worker}
70