blob: 1b3b2a126a147caf570030876535667530a0a897 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
zx_library("ftl") {
host = true
sources = [
"ftln/ftln_init.c",
"ftln/ftln_intrnl.c",
"ftln/ftln_rd.c",
"ftln/ftln_util.c",
"ftln/ndm-driver.cc",
"ftln/volume.cc",
"ndm/ndm_init.c",
"ndm/ndm_intrnl.c",
"ndm/ndm_vols.c",
"utils/aalloc.c",
"utils/crc32_tbl.c",
"utils/fsmem.c",
"utils/fsys.c",
"utils/fsysinit.c",
"utils/ftl_mc.c",
"utils/sys.c",
]
deps = [
"$zx/system/ulib/backtrace-request",
"$zx/system/ulib/fbl",
"$zx/system/ulib/fdio",
]
if (is_fuchsia) {
sources += [ "utils/semaphore.cc" ]
deps += [ "$zx/system/ulib/zircon" ]
} else {
sources += [ "utils/semaphore_posix.cc" ]
deps += [ "$zx/system/ulib/zircon:headers" ]
}
configs += [ ":config" ]
}
config("config") {
visibility = [ ":*" ]
defines = [ "NDM_DEBUG" ]
include_dirs = [ "." ]
}
zx_test("ftl_test") {
output_name = "ftl-lib-test"
sources = [
"test/ndm_test.cc",
]
deps = [
":ftl",
"$zx/system/ulib/zxtest",
]
configs += [ ":config" ]
}
group("test") {
testonly = true
deps = [
":ftl_test",
]
}