# Legacy hybrid-boot providers (IB05): hardware models used to run the
# generated image before the native ports replace them. Never part of the
# product executable (IB15 removes them from the product).
add_library(ib_legacy_boot STATIC
    boot/boot_bus.cpp
    boot/vmu.cpp
    firmware/boot_firmware.cpp
    firmware/disc_boot.cpp
    firmware/gdi_disc.cpp
    pvr/pvr_ta.cpp
    pvr/pvr_render.cpp
    aica/arm7.cpp
    aica/aica.cpp aica/aica_voice.cpp)
target_include_directories(ib_legacy_boot PUBLIC "${PROJECT_SOURCE_DIR}")
target_link_libraries(ib_legacy_boot PUBLIC ib_sh4_state ib_port ib_native_events ib_native_video)

# IB03 single-step interpreter, used by the hybrid boot only for code that the
# game copies to RAM outside the compiled image (interrupt vectors).
add_library(ib_legacy_sh4_interpreter STATIC "${PROJECT_SOURCE_DIR}/translator/sh4/src/cpu.cpp")
target_link_libraries(ib_legacy_sh4_interpreter PUBLIC ib_sh4_decoder)

# Hybrid boot loop over the generated image. The consumer links ib_game_image.
add_library(ib_legacy_hybrid STATIC boot/hybrid_machine.cpp)
target_link_libraries(ib_legacy_hybrid PUBLIC ib_legacy_boot ib_legacy_sh4_interpreter)
