| # 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/generate-dbus-proxies.gni") |
| import("//common-mk/pkg_config.gni") |
| |
| group("all") { |
| deps = [ |
| ":dbus_bindings", |
| ":smbfs", |
| ] |
| if (use.test) { |
| deps += [ ":smbfs_test" ] |
| } |
| } |
| |
| pkg_config("target_defaults") { |
| pkg_deps = [ |
| "libbrillo-${libbase_ver}", |
| "libchrome-${libbase_ver}", |
| "fuse", |
| "smbclient", |
| ] |
| defines = [ "FUSE_USE_VERSION=26" ] |
| } |
| |
| static_library("libsmbfs") { |
| sources = [ |
| "filesystem.cc", |
| "filesystem.h", |
| "fuse_session.cc", |
| "fuse_session.h", |
| "inode_map.cc", |
| "inode_map.h", |
| "request.cc", |
| "request.h", |
| "smb_filesystem.cc", |
| "smb_filesystem.h", |
| "smbfs.h", |
| "smbfs_daemon.cc", |
| "smbfs_daemon.h", |
| "test_filesystem.cc", |
| "test_filesystem.h", |
| "util.cc", |
| "util.h", |
| ] |
| configs += [ ":target_defaults" ] |
| deps = [ |
| ":dbus_bindings", |
| ] |
| } |
| |
| generate_dbus_proxies("dbus_bindings") { |
| sources = [ |
| "dbus_bindings/org.chromium.SmbFs.xml", |
| ] |
| proxy_output_file = "include/smbfs/dbus-proxies.h" |
| mock_output_file = "include/smbfs/dbus-proxy-mocks.h" |
| } |
| |
| executable("smbfs") { |
| sources = [ |
| "main.cc", |
| ] |
| configs += [ ":target_defaults" ] |
| deps = [ |
| ":libsmbfs", |
| ] |
| } |
| |
| if (use.test) { |
| executable("smbfs_test") { |
| configs += [ |
| "//common-mk:test", |
| ":target_defaults", |
| ] |
| deps = [ |
| ":libsmbfs", |
| "//common-mk/testrunner:testrunner", |
| ] |
| sources = [ |
| "inode_map_test.cc", |
| "util_test.cc", |
| ] |
| } |
| } |