blob: cfb97fe32254301476956e81000a197e6e9d7289 [file] [log] [blame]
cmake_minimum_required(VERSION 3.0)
project(6502 VERSION 0.1.0 LANGUAGES C)
option(GEN_INSTRUCTIONS_HEADER ON)
include_directories(nuklear)
if (${GEN_INSTRUCTIONS_HEADER})
add_custom_command(
OUTPUT instructions.h
DEPENDS csv2h.awk 6502.csv
COMMAND awk -f csv2h.awk 6502.csv > instructions.h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
add_executable(6502 main.c cpu.c cpu.h dbg.c dbg.h
instructions.h gui.h gui.c screen.h screen.c common.h common.c)
target_link_libraries(6502 readline SDL2 GL GLU GLEW m rt pthread)