add boot.bin cmake target

This commit is contained in:
sfja 2026-11-05 19:54:24 +01:00
parent 055cffc95d
commit 58a486334c
5 changed files with 25 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
build/
.vscode/
program.bin

View File

@ -9,6 +9,13 @@ find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3-shared)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_subdirectory(src)
add_subdirectory(boot)
add_custom_target(
run
DEPENDS emu boot/boot.bin
COMMAND emu boot/boot.bin
VERBATIM
USES_TERMINAL
)

15
boot/CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
add_custom_command(
OUTPUT boot.bin
DEPENDS asm ${PROJECT_SOURCE_DIR}/boot/boot.vc6asm
COMMAND asm ${PROJECT_SOURCE_DIR}/boot/boot.vc6asm -o boot.bin
VERBATIM
)
add_custom_target(
boot.bin
ALL
DEPENDS boot.bin
)

View File

@ -15,9 +15,6 @@ target_include_directories(isa PUBLIC .)
add_executable(emu WIN32 emu.c)
target_link_libraries(emu PRIVATE project_options isa SDL3::SDL3)
add_executable(asm WIN32 asm.c)
add_executable(asm asm.c)
target_link_libraries(asm PRIVATE project_options isa)