blob: 0a17e70226ccb0a5e18f15bcc8c383ec24aae258 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//common-mk/pkg_config.gni")
import("//common-mk/proto_library.gni")
group("all") {
deps = [ ":ml_benchmark" ]
if (use.test) {
deps += [ ":ml_benchmark_test" ]
}
}
pkg_config("target_defaults") {
pkg_deps = [
"libbrillo",
"libchrome-${libbase_ver}",
]
}
proto_library("ml_benchmark_config_proto") {
proto_in_dir = "proto"
proto_out_dir = "include/proto"
sources = [ "${proto_in_dir}/benchmark_config.proto" ]
}
static_library("libmlbenchmark") {
sources = [
"shared_library_benchmark.cc",
"shared_library_benchmark_functions.cc",
]
configs += [ ":target_defaults" ]
deps = [ ":ml_benchmark_config_proto" ]
pkg_deps = [ "protobuf" ]
}
executable("ml_benchmark") {
sources = [ "main.cc" ]
configs += [ ":target_defaults" ]
deps = [
":libmlbenchmark",
":ml_benchmark_config_proto",
]
pkg_deps = [ "protobuf" ]
}
if (use.test) {
pkg_config("ml_benchmark_test_config") {
pkg_deps = [ "libchrome-test-${libbase_ver}" ]
}
executable("ml_benchmark_test") {
sources = [ "shared_library_benchmark_test.cc" ]
configs += [
"//common-mk:test",
":ml_benchmark_test_config",
":target_defaults",
]
deps = [
":libmlbenchmark",
":ml_benchmark_config_proto",
"//common-mk/testrunner",
]
pkg_deps = [ "protobuf" ]
}
}