diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a88a9f6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.17) +project(stfdecomp) + +# assumes that the toolchain is on the path +set(CMAKE_C_COMPILER i960-elf-gcc) # modify as needed +set(CMAKE_CXX_COMPILER i960-elf-g++) # for completeness +set(CMAKE_ASM-ATT_COMPILER i960-elf-as) # modify as needed +set(CMAKE_LINKER i960-elf-ld) + +set(CMAKE_ASM-ATT_FLAGS "${CMAKE_ASM_FLAGS} -AKB -J") + +add_executable(rom.bin + rom_code1.asm + ) +target_link_options(rom.bin + PRIVATE -AKB + PRIVATE --oformat binary + PRIVATE -e 0xB0 +) + + +add_custom_command( + OUTPUT epr-19001.15 epr-19002.10 + COMMAND stfbin2rom.py + --input rom.bin + --verify + VERBATIM + DEPENDS rom.bin +) + +add_custom_target(game_code + DEPENDS epr-19001.15 epr-19002.10 +)