blob: 66ba7bc9df557bbf48149c3c48254eb283e2884d [file] [log] [blame]
Anton Hanssonda4972f2020-01-08 09:48:18 +00001// Copyright (C) 2019 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 Badourfb31e852021-02-22 16:09:19 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Anton Hansson36e2b132019-12-19 12:10:53 +000019cc_defaults {
20 name: "derive_sdk-defaults",
Nikita Ioffe10c87182020-10-20 16:07:01 +010021 min_sdk_version: "30",
Jooyung Hanc7c45302020-04-23 15:25:04 +090022 shared_libs: ["liblog"],
23 // static c++/libbase for smaller size
Anton Hanssonda4972f2020-01-08 09:48:18 +000024 stl: "c++_static",
Anton Hanssonb1a217c2020-11-30 11:43:05 +000025 static_libs: [
26 "libbase",
27 "libmodules-utils-build",
Anton Hanssondddcb572020-11-24 09:32:14 +000028 "libprotobuf-cpp-lite",
Paul Duffin435eaf12021-05-17 13:19:48 +010029 "libsdk_proto",
Anton Hanssonb1a217c2020-11-30 11:43:05 +000030 ],
Anton Hanssonda4972f2020-01-08 09:48:18 +000031}
32
Anton Hanssondddcb572020-11-24 09:32:14 +000033cc_library {
34 name: "libderive_sdk",
Anton Hansson502b7752021-01-06 12:16:54 +000035 srcs: ["derive_sdk.cpp"],
Anton Hanssondddcb572020-11-24 09:32:14 +000036 defaults: ["derive_sdk-defaults"],
37 apex_available: ["com.android.sdkext"],
38}
39
40cc_defaults {
41 name: "derive_sdk_binary-defaults",
42 defaults: ["derive_sdk-defaults"],
43 srcs: ["main.cpp"],
44 static_libs: ["libderive_sdk"],
45
46}
Paul Duffin435eaf12021-05-17 13:19:48 +010047
Anton Hansson36e2b132019-12-19 12:10:53 +000048cc_binary {
49 name: "derive_sdk",
Anton Hanssondddcb572020-11-24 09:32:14 +000050 defaults: ["derive_sdk_binary-defaults"],
51 apex_available: ["com.android.sdkext"],
Anton Hansson36e2b132019-12-19 12:10:53 +000052}
53
Anton Hansson4c639682021-05-27 10:01:34 +000054// Work around testing using a 64-bit test suite on 32-bit test device by
55// using a prefer32 version of derive_sdk in testing.
56cc_binary {
57 name: "derive_sdk_prefer32",
58 defaults: ["derive_sdk_binary-defaults"],
59 compile_multilib: "prefer32",
60 stem: "derive_sdk",
61 apex_available: ["test_com.android.sdkext"],
62 installable: false,
63}
64
Anton Hanssondddcb572020-11-24 09:32:14 +000065cc_test {
66 name: "derive_sdk_test",
67 defaults: ["derive_sdk-defaults"],
Anton Hansson502b7752021-01-06 12:16:54 +000068 srcs: ["derive_sdk_test.cpp"],
Anton Hanssondddcb572020-11-24 09:32:14 +000069 require_root: true,
70 static_libs: ["libderive_sdk"],
71 test_suites: ["device-tests"],
72}
73
Anton Hanssonda4972f2020-01-08 09:48:18 +000074prebuilt_etc {
75 name: "derive_sdk.rc",
76 src: "derive_sdk.rc",
77 installable: false,
78}