You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.0 KiB
79 lines
2.0 KiB
// Copyright (C) 2019 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "derive_sdk-defaults",
|
|
min_sdk_version: "30",
|
|
shared_libs: ["liblog"],
|
|
// static c++/libbase for smaller size
|
|
stl: "c++_static",
|
|
static_libs: [
|
|
"libbase",
|
|
"libmodules-utils-build",
|
|
"libprotobuf-cpp-lite",
|
|
"libsdk_proto",
|
|
],
|
|
}
|
|
|
|
cc_library {
|
|
name: "libderive_sdk",
|
|
srcs: ["derive_sdk.cpp"],
|
|
defaults: ["derive_sdk-defaults"],
|
|
apex_available: ["com.android.sdkext"],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "derive_sdk_binary-defaults",
|
|
defaults: ["derive_sdk-defaults"],
|
|
srcs: ["main.cpp"],
|
|
static_libs: ["libderive_sdk"],
|
|
|
|
}
|
|
|
|
cc_binary {
|
|
name: "derive_sdk",
|
|
defaults: ["derive_sdk_binary-defaults"],
|
|
apex_available: ["com.android.sdkext"],
|
|
}
|
|
|
|
// Work around testing using a 64-bit test suite on 32-bit test device by
|
|
// using a prefer32 version of derive_sdk in testing.
|
|
cc_binary {
|
|
name: "derive_sdk_prefer32",
|
|
defaults: ["derive_sdk_binary-defaults"],
|
|
compile_multilib: "prefer32",
|
|
stem: "derive_sdk",
|
|
apex_available: ["test_com.android.sdkext"],
|
|
installable: false,
|
|
}
|
|
|
|
cc_test {
|
|
name: "derive_sdk_test",
|
|
defaults: ["derive_sdk-defaults"],
|
|
srcs: ["derive_sdk_test.cpp"],
|
|
require_root: true,
|
|
static_libs: ["libderive_sdk"],
|
|
test_suites: ["device-tests"],
|
|
}
|
|
|
|
prebuilt_etc {
|
|
name: "derive_sdk.rc",
|
|
src: "derive_sdk.rc",
|
|
installable: false,
|
|
}
|