set(RACE "${CMAKE_CURRENT_LIST_DIR}/../core/race")
idf_component_register(
  SRCS "app.c" "presentation.c" "storage.c" "ngpc_core.c"
    "${RACE}/tlcs900h.c" "${RACE}/graphics.c" "${RACE}/main.c"
    "${RACE}/flash.c" "${RACE}/race-memory.c" "${RACE}/ngpBios.c"
    "${RACE}/sound.c" "${RACE}/neopopsound.c"
    "${RACE}/cz80.c" "${RACE}/cz80_support.c"
  INCLUDE_DIRS "." "${RACE}")
target_compile_definitions(${COMPONENT_LIB} PRIVATE CZ80 _MAX_PATH=256)
target_compile_options(${COMPONENT_LIB} PRIVATE
  -O3 -fjump-tables -ftree-switch-conversion -fno-strict-aliasing -nostartfiles -nostdlib -fno-builtin
  -Wno-error=unused-variable -Wno-error=unused-function
  -Wno-error=unused-label
  -Wno-error=implicit-fallthrough -Wno-error=misleading-indentation)
