blob: 0c3410711922c91dd6c740f55fa857e9a11b8d18 [file] [log] [blame]
# Copyright 2020 The Pigweed Authors
#
# 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
#
# https://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.
import("//build_overrides/pigweed.gni")
import("$dir_pw_arduino_build/arduino.gni")
import("$dir_pw_build/target_types.gni")
import("$dir_pw_tokenizer/database.gni")
group("all") {
deps = [ ":kvs" ]
# Build tokenizer_database for elf binaries only
if (host_os == "linux" || current_toolchain != "//targets/host:host_debug") {
deps += [ ":tokenizer_database" ]
}
}
pw_executable("kvs") {
sources = [ "main.cc" ]
deps = [
"$dir_pw_kvs",
"$dir_pw_kvs:flash_test_partition",
"$dir_pw_log",
"//source/pw_board_led",
"//source/pw_spin_delay",
]
# Disable teensy flash tests until the patcher is available.
# To enable: uncomment this and modify eeprom.c to remove static from
# flash_write() and flash_erase_sector()
# if (pw_build_EXECUTABLE_TARGET_TYPE == "arduino_executable" &&
# pw_arduino_build_CORE_PATH != "" &&
# (pw_arduino_build_BOARD == "teensy40" || pw_arduino_build_BOARD == "teensy41")) {
# deps += [ "//source/teensy_flash:teensy_flash_test_partition" ]
# } else {
deps += [ "$dir_pw_kvs:fake_flash_1_aligned_partition" ]
# }
}
pw_tokenizer_database("tokenizer_database") {
database = "tokenizer_database.csv"
targets = [ ":kvs" ]
}