| # Copyright 2018 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") |
| |
| group("all") { |
| deps = [ |
| ":bio_crypto_init", |
| ":bio_wash", |
| ":biod", |
| ":biod_client_tool", |
| ":libbiod", |
| ] |
| if (use.test) { |
| deps += [ ":biod_test_runner" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo-${libbase_ver}", |
| "libchrome-${libbase_ver}", |
| "libmetrics-${libbase_ver}", |
| |
| # system_api depends on protobuf (or protobuf-lite). It must appear |
| # before protobuf here or the linker flags won't be in the right |
| # order. |
| "system_api", |
| "protobuf-lite", |
| ] |
| } |
| |
| static_library("libbiod") { |
| configs += [ ":target_defaults" ] |
| sources = [ |
| "biod_metrics.cc", |
| "biod_storage.cc", |
| "biometrics_daemon.cc", |
| "cros_fp_biometrics_manager.cc", |
| "scoped_umask.cc", |
| "uinput_device.cc", |
| ] |
| } |
| |
| executable("biod") { |
| configs += [ ":target_defaults" ] |
| sources = [ |
| "main.cc", |
| ] |
| deps = [ |
| ":libbiod", |
| ] |
| } |
| |
| executable("bio_crypto_init") { |
| configs += [ ":target_defaults" ] |
| sources = [ |
| "bio_crypto_init.cc", |
| ] |
| libs = [ "-ldl" ] |
| deps = [ |
| ":libbiod", |
| ] |
| } |
| |
| executable("bio_wash") { |
| configs += [ ":target_defaults" ] |
| sources = [ |
| "bio_wash.cc", |
| ] |
| libs = [ "-ldl" ] |
| deps = [ |
| ":libbiod", |
| ] |
| } |
| |
| executable("biod_client_tool") { |
| configs += [ ":target_defaults" ] |
| sources = [ |
| "tools/biod_client_tool.cc", |
| ] |
| } |
| |
| if (use.test) { |
| pkg_config("libchrome_test_config") { |
| pkg_deps = [ "libchrome-test-${libbase_ver}" ] |
| } |
| executable("biod_test_runner") { |
| configs += [ |
| "//common-mk:test", |
| ":libchrome_test_config", |
| ":target_defaults", |
| ] |
| sources = [ |
| "biod_metrics_test.cc", |
| "biod_storage_test.cc", |
| ] |
| deps = [ |
| ":libbiod", |
| "//common-mk/testrunner", |
| ] |
| } |
| } |