blob: 0ae5f8a4954d11dcd2e793c520bfb95cff0a3027 [file] [log] [blame]
// Copyright (C) 2018 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.
filegroup {
name: "iorap-aidl",
srcs: [
// note: using **/* doesn't work, so list each file one by one:
// see also b/70046217
// note: list only 'interface' aidl files, otherwise
// aidl generates an error "Refusing to generate code with unstructured parcelables."
"binder/com/google/android/startop/iorap/IIorap.aidl",
"binder/com/google/android/startop/iorap/ITaskListener.aidl",
],
path: "binder",
}
cc_defaults {
name: "iorap-default-flags",
cflags: [
"-Wall",
"-Werror",
"-Wextra",
"-Wno-missing-field-initializers",
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
local_include_dirs: [
"include",
"src",
],
// TODO: shouldn't need this but there's a soong/cmake generator bug.
export_include_dirs: [
"include",
"src",
],
clang: true,
shared_libs: ["libbase"],
}
cc_defaults {
name: "iorap-default-dependencies",
static_libs: [
"libiorap-binder",
],
shared_libs: [
"libiorap",
"libbinder",
"libutils",
"libcutils", // tracing.
// TODO: remove these annoying dependencies by hiding them in the main library code.
],
}
cc_library_shared {
name: "libiorap",
defaults: [
"iorap-default-flags",
],
srcs: [
],
//export_include_dirs: ["include"],
//local_include_dirs: ["src/native"],
static_libs: [
"libprotobuf-cpp-lite",
],
}
cc_library_static {
name: "libiorap-binder",
defaults: ["iorap-default-flags"],
srcs: [
":iorap-aidl",
"src/binder/iiorap_impl.cc",
],
shared_libs: [
"libbinder",
"libutils",
"libcutils", // tracing.
],
aidl: {
local_include_dirs: ["binder"],
include_dirs: ["frameworks/native/aidl/binder"],
export_aidl_headers: true,
},
}
cc_binary {
name: "iorapd",
defaults: [
"iorap-default-flags",
"iorap-default-dependencies",
],
srcs: [
"src/iorapd/main.cc",
],
init_rc: [
"iorapd.rc",
],
}
cc_test {
name: "iorapd-tests",
test_suites: ["device-tests"],
defaults: [
"iorap-default-flags",
"iorap-default-dependencies",
],
srcs: [
"tests/src/**/*.cc",
],
}