From 7154e51d86eaf0815094a1f25e4fccebfbe1df35 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Mon, 20 Apr 2020 20:32:09 +0200 Subject: [PATCH] Make debugger standalone component. --- CMakeLists.txt | 10 ++++++---- debugger/CMakeLists.txt | 5 +++++ debugger/debugger.cpp | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 debugger/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ce2437..a257504 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ include_directories(${SDL2_INCLUDE_DIRS}) endif() add_subdirectory("${PROJECT_SOURCE_DIR}/cpu/ppc/") +add_subdirectory("${PROJECT_SOURCE_DIR}/debugger/") add_subdirectory("${PROJECT_SOURCE_DIR}/devices/") add_subdirectory("${PROJECT_SOURCE_DIR}/machines/") add_subdirectory("${PROJECT_SOURCE_DIR}/thirdparty/loguru/") @@ -26,12 +27,12 @@ include_directories("${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/devices" file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/*.cpp" "${PROJECT_SOURCE_DIR}/*.c" "${PROJECT_SOURCE_DIR}/*.hpp" - "${PROJECT_SOURCE_DIR}/*.h" - "${PROJECT_SOURCE_DIR}/debugger/*.cpp") + "${PROJECT_SOURCE_DIR}/*.h") file(GLOB TEST_SOURCES "${PROJECT_SOURCE_DIR}/cpu/ppc/test/*.cpp") -add_executable(dingusppc ${SOURCES} $ +add_executable(dingusppc ${SOURCES} $ + $ $ $ $) @@ -44,7 +45,8 @@ target_link_libraries(dingusppc ${SDL2_LIBRARIES}) endif() -add_executable(testppc ${TEST_SOURCES} $ +add_executable(testppc ${TEST_SOURCES} $ + $ $ $ $) diff --git a/debugger/CMakeLists.txt b/debugger/CMakeLists.txt new file mode 100644 index 0000000..42459a4 --- /dev/null +++ b/debugger/CMakeLists.txt @@ -0,0 +1,5 @@ +include_directories("${PROJECT_SOURCE_DIR}") + +file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") + +add_library(debugger OBJECT ${SOURCES}) \ No newline at end of file diff --git a/debugger/debugger.cpp b/debugger/debugger.cpp index 0dd938f..dc1509d 100644 --- a/debugger/debugger.cpp +++ b/debugger/debugger.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include #include #include -#include "ppcemu.h" +#include "../cpu/ppc/ppcemu.h" #include "../cpu/ppc/ppcmmu.h" #include "../cpu/ppc/ppcdisasm.h" #include