blob: cfb97fe32254301476956e81000a197e6e9d7289 [file] [log] [blame]
swissChili6c61a792020-07-28 16:29:20 -07001cmake_minimum_required(VERSION 3.0)
2
3project(6502 VERSION 0.1.0 LANGUAGES C)
4
5option(GEN_INSTRUCTIONS_HEADER ON)
6
swissChilidbbd5402020-08-07 15:07:39 -07007include_directories(nuklear)
8
swissChili6c61a792020-07-28 16:29:20 -07009if (${GEN_INSTRUCTIONS_HEADER})
10 add_custom_command(
11 OUTPUT instructions.h
12 DEPENDS csv2h.awk 6502.csv
13 COMMAND awk -f csv2h.awk 6502.csv > instructions.h
14 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
15endif()
16
swissChilib71e0272020-08-08 15:56:14 -070017add_executable(6502 main.c cpu.c cpu.h dbg.c dbg.h
18 instructions.h gui.h gui.c screen.h screen.c common.h common.c)
swissChilic6b4f7e2020-08-09 16:36:36 -070019target_link_libraries(6502 readline SDL2 GL GLU GLEW m rt pthread)