xref: /aosp_15_r20/prebuilts/sdk/renderscript/Android.bp (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1*344a7f5eSAndroid Build Coastguard Worker//
2*344a7f5eSAndroid Build Coastguard Worker// Copyright (C) 2013 The Android Open Source Project
3*344a7f5eSAndroid Build Coastguard Worker//
4*344a7f5eSAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
5*344a7f5eSAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
6*344a7f5eSAndroid Build Coastguard Worker// You may obtain a copy of the License at
7*344a7f5eSAndroid Build Coastguard Worker//
8*344a7f5eSAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
9*344a7f5eSAndroid Build Coastguard Worker//
10*344a7f5eSAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
11*344a7f5eSAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
12*344a7f5eSAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*344a7f5eSAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
14*344a7f5eSAndroid Build Coastguard Worker// limitations under the License.
15*344a7f5eSAndroid Build Coastguard Worker//
16*344a7f5eSAndroid Build Coastguard Worker
17*344a7f5eSAndroid Build Coastguard Worker//#################################
18*344a7f5eSAndroid Build Coastguard Workerpackage {
19*344a7f5eSAndroid Build Coastguard Worker    // See: http://go/android-license-faq
20*344a7f5eSAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
21*344a7f5eSAndroid Build Coastguard Worker    // all of the 'license_kinds' from "prebuilts_sdk_license"
22*344a7f5eSAndroid Build Coastguard Worker    // to get the below license kinds:
23*344a7f5eSAndroid Build Coastguard Worker    //   SPDX-license-identifier-Apache-2.0
24*344a7f5eSAndroid Build Coastguard Worker    //   SPDX-license-identifier-BSD
25*344a7f5eSAndroid Build Coastguard Worker    //   SPDX-license-identifier-MIT
26*344a7f5eSAndroid Build Coastguard Worker    //   SPDX-license-identifier-NCSA
27*344a7f5eSAndroid Build Coastguard Worker    default_applicable_licenses: ["prebuilts_sdk_license"],
28*344a7f5eSAndroid Build Coastguard Worker}
29*344a7f5eSAndroid Build Coastguard Worker
30*344a7f5eSAndroid Build Coastguard Workercc_prebuilt_library_shared {
31*344a7f5eSAndroid Build Coastguard Worker    name: "librsjni",
32*344a7f5eSAndroid Build Coastguard Worker    sdk_version: "23",
33*344a7f5eSAndroid Build Coastguard Worker    arch: {
34*344a7f5eSAndroid Build Coastguard Worker        arm: {
35*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/arm/librsjni.so"],
36*344a7f5eSAndroid Build Coastguard Worker        },
37*344a7f5eSAndroid Build Coastguard Worker        arm64: {
38*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/arm64/librsjni.so"],
39*344a7f5eSAndroid Build Coastguard Worker        },
40*344a7f5eSAndroid Build Coastguard Worker        x86: {
41*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/x86/librsjni.so"],
42*344a7f5eSAndroid Build Coastguard Worker        },
43*344a7f5eSAndroid Build Coastguard Worker        x86_64: {
44*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/x86_64/librsjni.so"],
45*344a7f5eSAndroid Build Coastguard Worker        },
46*344a7f5eSAndroid Build Coastguard Worker    },
47*344a7f5eSAndroid Build Coastguard Worker}
48*344a7f5eSAndroid Build Coastguard Worker
49*344a7f5eSAndroid Build Coastguard Worker//#################################
50*344a7f5eSAndroid Build Coastguard Workercc_prebuilt_library_shared {
51*344a7f5eSAndroid Build Coastguard Worker    name: "libRSSupport",
52*344a7f5eSAndroid Build Coastguard Worker    sdk_version: "23",
53*344a7f5eSAndroid Build Coastguard Worker    arch: {
54*344a7f5eSAndroid Build Coastguard Worker        arm: {
55*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/arm/libRSSupport.so"],
56*344a7f5eSAndroid Build Coastguard Worker        },
57*344a7f5eSAndroid Build Coastguard Worker        arm64: {
58*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/arm64/libRSSupport.so"],
59*344a7f5eSAndroid Build Coastguard Worker        },
60*344a7f5eSAndroid Build Coastguard Worker        x86: {
61*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/x86/libRSSupport.so"],
62*344a7f5eSAndroid Build Coastguard Worker        },
63*344a7f5eSAndroid Build Coastguard Worker        x86_64: {
64*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/x86_64/libRSSupport.so"],
65*344a7f5eSAndroid Build Coastguard Worker        },
66*344a7f5eSAndroid Build Coastguard Worker    },
67*344a7f5eSAndroid Build Coastguard Worker}
68*344a7f5eSAndroid Build Coastguard Worker
69*344a7f5eSAndroid Build Coastguard Worker//#################################
70*344a7f5eSAndroid Build Coastguard Workercc_prebuilt_library_shared {
71*344a7f5eSAndroid Build Coastguard Worker    name: "libRSSupportIO",
72*344a7f5eSAndroid Build Coastguard Worker    sdk_version: "23",
73*344a7f5eSAndroid Build Coastguard Worker    arch: {
74*344a7f5eSAndroid Build Coastguard Worker        arm: {
75*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/arm/libRSSupportIO.so"],
76*344a7f5eSAndroid Build Coastguard Worker        },
77*344a7f5eSAndroid Build Coastguard Worker        arm64: {
78*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/arm64/libRSSupportIO.so"],
79*344a7f5eSAndroid Build Coastguard Worker        },
80*344a7f5eSAndroid Build Coastguard Worker        x86: {
81*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/x86/libRSSupportIO.so"],
82*344a7f5eSAndroid Build Coastguard Worker        },
83*344a7f5eSAndroid Build Coastguard Worker        x86_64: {
84*344a7f5eSAndroid Build Coastguard Worker            srcs: ["lib/x86_64/libRSSupportIO.so"],
85*344a7f5eSAndroid Build Coastguard Worker        },
86*344a7f5eSAndroid Build Coastguard Worker    },
87*344a7f5eSAndroid Build Coastguard Worker}
88*344a7f5eSAndroid Build Coastguard Worker
89*344a7f5eSAndroid Build Coastguard Worker//#################################
90*344a7f5eSAndroid Build Coastguard Workerjava_import {
91*344a7f5eSAndroid Build Coastguard Worker    name: "android-support-v8-renderscript",
92*344a7f5eSAndroid Build Coastguard Worker    jars: ["lib/javalib.jar"],
93*344a7f5eSAndroid Build Coastguard Worker
94*344a7f5eSAndroid Build Coastguard Worker    // 23 as specified at frameworks/rs/support/Android.mk
95*344a7f5eSAndroid Build Coastguard Worker    sdk_version: "23",
96*344a7f5eSAndroid Build Coastguard Worker}
97*344a7f5eSAndroid Build Coastguard Worker
98*344a7f5eSAndroid Build Coastguard Worker//#################################
99*344a7f5eSAndroid Build Coastguard Workerjava_import {
100*344a7f5eSAndroid Build Coastguard Worker    name: "android-support-v8-renderscript-legacy",
101*344a7f5eSAndroid Build Coastguard Worker    jars: ["lib/javalib_legacy.jar"],
102*344a7f5eSAndroid Build Coastguard Worker
103*344a7f5eSAndroid Build Coastguard Worker    // 23 as specified at frameworks/rs/support/Android.mk
104*344a7f5eSAndroid Build Coastguard Worker    sdk_version: "23",
105*344a7f5eSAndroid Build Coastguard Worker}
106*344a7f5eSAndroid Build Coastguard Worker
107*344a7f5eSAndroid Build Coastguard Worker//#################################
108*344a7f5eSAndroid Build Coastguard Workergenrule {
109*344a7f5eSAndroid Build Coastguard Worker    name: "renderscript_sdk_prebuilts",
110*344a7f5eSAndroid Build Coastguard Worker    visibility: ["//development/build"],
111*344a7f5eSAndroid Build Coastguard Worker    tools: ["soong_zip", "zip2zip"],
112*344a7f5eSAndroid Build Coastguard Worker    cmd: "echo $(in) >$(genDir)/list && " +
113*344a7f5eSAndroid Build Coastguard Worker        "$(location soong_zip) -o $(out).unmapped -C prebuilts/sdk/renderscript/lib -l $(genDir)/list && " +
114*344a7f5eSAndroid Build Coastguard Worker        "$(location zip2zip) -i $(out).unmapped -o $(out)" +
115*344a7f5eSAndroid Build Coastguard Worker        " javalib.jar:renderscript/lib/androidx-rs.jar" +
116*344a7f5eSAndroid Build Coastguard Worker        " javalib_legacy.jar:renderscript/lib/renderscript-v8.jar" +
117*344a7f5eSAndroid Build Coastguard Worker        " arm/libc.so:renderscript/lib/intermediates/armeabi-v7a/libc.so" +
118*344a7f5eSAndroid Build Coastguard Worker        " arm/libm.so:renderscript/lib/intermediates/armeabi-v7a/libm.so" +
119*344a7f5eSAndroid Build Coastguard Worker        " arm/libcompiler_rt.a:renderscript/lib/intermediates/armeabi-v7a/libcompiler_rt.a" +
120*344a7f5eSAndroid Build Coastguard Worker        " arm/libRSSupport.so:renderscript/lib/packaged/armeabi-v7a/libRSSupport.so" +
121*344a7f5eSAndroid Build Coastguard Worker        " arm/librsjni.so:renderscript/lib/packaged/armeabi-v7a/librsjni.so" +
122*344a7f5eSAndroid Build Coastguard Worker        " arm/librsjni_androidx.so:renderscript/lib/packaged/armeabi-v7a/librsjni_androidx.so" +
123*344a7f5eSAndroid Build Coastguard Worker        " arm/libblasV8.so:renderscript/lib/blas/armeabi-v7a/libblasV8.so" +
124*344a7f5eSAndroid Build Coastguard Worker        " arm/librsrt_arm.bc:renderscript/lib/bc/armeabi-v7a/libclcore.bc" +
125*344a7f5eSAndroid Build Coastguard Worker        " x86/libc.so:renderscript/lib/intermediates/x86/libc.so" +
126*344a7f5eSAndroid Build Coastguard Worker        " x86/libm.so:renderscript/lib/intermediates/x86/libm.so" +
127*344a7f5eSAndroid Build Coastguard Worker        " x86/libcompiler_rt.a:renderscript/lib/intermediates/x86/libcompiler_rt.a" +
128*344a7f5eSAndroid Build Coastguard Worker        " x86/libRSSupport.so:renderscript/lib/packaged/x86/libRSSupport.so" +
129*344a7f5eSAndroid Build Coastguard Worker        " x86/librsjni.so:renderscript/lib/packaged/x86/librsjni.so" +
130*344a7f5eSAndroid Build Coastguard Worker        " x86/librsjni_androidx.so:renderscript/lib/packaged/x86/librsjni_androidx.so" +
131*344a7f5eSAndroid Build Coastguard Worker        " x86/libblasV8.so:renderscript/lib/blas/x86/libblasV8.so" +
132*344a7f5eSAndroid Build Coastguard Worker        " x86/librsrt_x86.bc:renderscript/lib/bc/x86/libclcore.bc" +
133*344a7f5eSAndroid Build Coastguard Worker        " arm64/libc.so:renderscript/lib/intermediates/arm64-v8a/libc.so" +
134*344a7f5eSAndroid Build Coastguard Worker        " arm64/libm.so:renderscript/lib/intermediates/arm64-v8a/libm.so" +
135*344a7f5eSAndroid Build Coastguard Worker        " arm64/libcompiler_rt.a:renderscript/lib/intermediates/arm64-v8a/libcompiler_rt.a" +
136*344a7f5eSAndroid Build Coastguard Worker        " arm64/libRSSupport.so:renderscript/lib/packaged/arm64-v8a/libRSSupport.so" +
137*344a7f5eSAndroid Build Coastguard Worker        " arm64/librsjni.so:renderscript/lib/packaged/arm64-v8a/librsjni.so" +
138*344a7f5eSAndroid Build Coastguard Worker        " arm64/librsjni_androidx.so:renderscript/lib/packaged/arm64-v8a/librsjni_androidx.so" +
139*344a7f5eSAndroid Build Coastguard Worker        " arm64/libblasV8.so:renderscript/lib/blas/arm64-v8a/libblasV8.so" +
140*344a7f5eSAndroid Build Coastguard Worker        " arm64/librsrt_arm64.bc:renderscript/lib/bc/arm64-v8a/libclcore.bc" +
141*344a7f5eSAndroid Build Coastguard Worker        " x86_64/libc.so:renderscript/lib/intermediates/x86_64/libc.so" +
142*344a7f5eSAndroid Build Coastguard Worker        " x86_64/libm.so:renderscript/lib/intermediates/x86_64/libm.so" +
143*344a7f5eSAndroid Build Coastguard Worker        " x86_64/libcompiler_rt.a:renderscript/lib/intermediates/x86_64/libcompiler_rt.a" +
144*344a7f5eSAndroid Build Coastguard Worker        " x86_64/libRSSupport.so:renderscript/lib/packaged/x86_64/libRSSupport.so" +
145*344a7f5eSAndroid Build Coastguard Worker        " x86_64/librsjni.so:renderscript/lib/packaged/x86_64/librsjni.so" +
146*344a7f5eSAndroid Build Coastguard Worker        " x86_64/librsjni_androidx.so:renderscript/lib/packaged/x86_64/librsjni_androidx.so" +
147*344a7f5eSAndroid Build Coastguard Worker        " x86_64/libblasV8.so:renderscript/lib/blas/x86_64/libblasV8.so" +
148*344a7f5eSAndroid Build Coastguard Worker        " x86_64/librsrt_x86_64.bc:renderscript/lib/bc/x86_64/libclcore.bc",
149*344a7f5eSAndroid Build Coastguard Worker    srcs: ["lib/**/*"],
150*344a7f5eSAndroid Build Coastguard Worker    out: ["prebuilts.zip"],
151*344a7f5eSAndroid Build Coastguard Worker}