cmake_minimum_required(VERSION 3.0)
project(nemu)

set(SRCS
    src/main.c
    src/cpu.c
    src/syscall.c
    src/instructions/mov.c
    src/instructions/movl.c
    src/instructions/movb.c
    src/instructions/movw.c
    src/instructions/shift.c
    src/instructions/operations.c
    src/instructions/logic.c
    src/instructions/jmp.c
    src/syscall/bdisp.c
    src/syscall/text.c
    src/syscall/malloc.c
    src/display.c
    src/instructions/system.c
    src/log.c
    src/memory.c
    src/syscall/keyboard.c
    src/syscall/bfile.c
)

find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})

add_executable(nemu ${SRCS})
target_link_libraries(nemu ${SDL2_LIBRARIES})
include_directories(src)
install(TARGETS nemu DESTINATION bin)
set(CMAKE_BUILD_TYPE Debug)