xref: /aosp_15_r20/external/emboss/Android.bp (revision 99e0aae7469b87d12f0ad23e61142c2d74c1ef70)
1*99e0aae7SDavid Rees// Copyright (C) 2024 The Android Open Source Project
2*99e0aae7SDavid Rees//
3*99e0aae7SDavid Rees// Licensed under the Apache License, Version 2.0 (the "License");
4*99e0aae7SDavid Rees// you may not use this file except in compliance with the License.
5*99e0aae7SDavid Rees// You may obtain a copy of the License at
6*99e0aae7SDavid Rees//
7*99e0aae7SDavid Rees//      http://www.apache.org/licenses/LICENSE-2.0
8*99e0aae7SDavid Rees//
9*99e0aae7SDavid Rees// Unless required by applicable law or agreed to in writing, software
10*99e0aae7SDavid Rees// distributed under the License is distributed on an "AS IS" BASIS,
11*99e0aae7SDavid Rees// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*99e0aae7SDavid Rees// See the License for the specific language governing permissions and
13*99e0aae7SDavid Rees// limitations under the License.
14*99e0aae7SDavid Rees
15*99e0aae7SDavid Reespackage {
16*99e0aae7SDavid Rees    default_applicable_licenses: ["external_emboss_license"],
17*99e0aae7SDavid Rees}
18*99e0aae7SDavid Rees
19*99e0aae7SDavid Reeslicense {
20*99e0aae7SDavid Rees    name: "external_emboss_license",
21*99e0aae7SDavid Rees    visibility: [":__subpackages__"],
22*99e0aae7SDavid Rees    license_kinds: [
23*99e0aae7SDavid Rees        "SPDX-license-identifier-Apache-2.0",
24*99e0aae7SDavid Rees    ],
25*99e0aae7SDavid Rees    license_text: [
26*99e0aae7SDavid Rees        "LICENSE",
27*99e0aae7SDavid Rees    ],
28*99e0aae7SDavid Rees}
29*99e0aae7SDavid Rees
30*99e0aae7SDavid Reespython_library_host {
31*99e0aae7SDavid Rees    name: "emboss_compiler",
32*99e0aae7SDavid Rees    srcs: [
33*99e0aae7SDavid Rees        "compiler/**/*.py",
34*99e0aae7SDavid Rees    ],
35*99e0aae7SDavid Rees    data: [
36*99e0aae7SDavid Rees        "compiler/back_end/cpp/generated_code_templates",
37*99e0aae7SDavid Rees        "compiler/front_end/error_examples",
38*99e0aae7SDavid Rees        "compiler/front_end/prelude.emb",
39*99e0aae7SDavid Rees        "compiler/front_end/reserved_words",
40*99e0aae7SDavid Rees    ],
41*99e0aae7SDavid Rees}
42*99e0aae7SDavid Rees
43*99e0aae7SDavid Rees// This is a python script that is dependent on the emboss_compiler library.
44*99e0aae7SDavid Rees// Since it is not a .py file, it cannot be included as a src file in a
45*99e0aae7SDavid Rees// python_binary_host module. Instead, a genrule invoking this script will need
46*99e0aae7SDavid Rees// to create a python_binary_host with a wrapper python file which calls this
47*99e0aae7SDavid Rees// script. The wrapper file will need to include the emboss_compiler library in
48*99e0aae7SDavid Rees// its libs. This script should be included in the tool_files of the genrule and
49*99e0aae7SDavid Rees// passed to the python wrapper as an argument in the cmd field.
50*99e0aae7SDavid Reesfilegroup {
51*99e0aae7SDavid Rees    name: "embossc_script",
52*99e0aae7SDavid Rees    srcs: [
53*99e0aae7SDavid Rees        "embossc",
54*99e0aae7SDavid Rees    ],
55*99e0aae7SDavid Rees}
56*99e0aae7SDavid Rees
57*99e0aae7SDavid Reescc_library_headers {
58*99e0aae7SDavid Rees    name: "emboss_runtime_headers",
59*99e0aae7SDavid Rees    cpp_std: "c++20",
60*99e0aae7SDavid Rees    vendor_available: true,
61*99e0aae7SDavid Rees    export_include_dirs: [
62*99e0aae7SDavid Rees        ".",
63*99e0aae7SDavid Rees    ],
64*99e0aae7SDavid Rees    host_supported: true,
65*99e0aae7SDavid Rees}
66