From e0eff6e6249d16ccc1beac1eb1d53ed202be657e Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Mon, 27 Mar 2023 13:02:46 +0200 Subject: [PATCH] restructured --- CMakeLists.txt | 2 +- README.md | 15 +++++++++------ console.h | 2 +- log.cpp | 2 +- windows/mingw64.cmake => mingw64.cmake | 2 -- utils.cpp | 2 +- windows/win32.cpp => win32.cpp | 0 windows/win32.h => win32.h | 0 windows/README.txt | 3 --- 9 files changed, 13 insertions(+), 15 deletions(-) rename windows/mingw64.cmake => mingw64.cmake (90%) rename windows/win32.cpp => win32.cpp (100%) rename windows/win32.h => win32.h (100%) delete mode 100644 windows/README.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index beac89f..424619a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ add_executable( tm-11.cpp tty.cpp utils.cpp - windows/win32.cpp + win32.cpp ) include(CheckIPOSupported) diff --git a/README.md b/README.md index 1c9ba51..e0064db 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,22 @@ Kek is a DEC PDP-11 (11/70) emulator capable of running UNIX-v6. To build for e.g. linux: + mkdir build + cd build + cmake .. make kek + Required: + * libncursesw5-dev + To build for e.g. windows: + mkdir build-win32 + cd build-win32 + cmake -DCMAKE_TOOLCHAIN_FILE=../mingw64.cmake .. make kek-win32 - -Required: - -* libncursesw5-dev - - To run a disk image: ./kek -R filename.rk -b 2> /dev/null diff --git a/console.h b/console.h index cb41180..f24a595 100644 --- a/console.h +++ b/console.h @@ -11,7 +11,7 @@ #include "bus.h" #if defined(_WIN32) -#include "windows/win32.h" +#include "win32.h" #endif diff --git a/log.cpp b/log.cpp index 3df6975..06a5e3c 100644 --- a/log.cpp +++ b/log.cpp @@ -12,7 +12,7 @@ #include "error.h" #include "log.h" #include "utils.h" -#include "windows/win32.h" +#include "win32.h" static const char *logfile = strdup("/tmp/myip.log"); diff --git a/windows/mingw64.cmake b/mingw64.cmake similarity index 90% rename from windows/mingw64.cmake rename to mingw64.cmake index 429aa40..3712e34 100644 --- a/windows/mingw64.cmake +++ b/mingw64.cmake @@ -1,5 +1,3 @@ -# cmake -DCMAKE_TOOLCHAIN_FILE=mingw64.cmake .. - set(CMAKE_SYSTEM_NAME Windows) set(TOOLCHAIN_PREFIX x86_64-w64-mingw32) diff --git a/utils.cpp b/utils.cpp index 6923d95..37e3acb 100644 --- a/utils.cpp +++ b/utils.cpp @@ -16,7 +16,7 @@ #include #include -#include "windows/win32.h" +#include "win32.h" void setBit(uint16_t & v, const int bit, const bool vb) diff --git a/windows/win32.cpp b/win32.cpp similarity index 100% rename from windows/win32.cpp rename to win32.cpp diff --git a/windows/win32.h b/win32.h similarity index 100% rename from windows/win32.h rename to win32.h diff --git a/windows/README.txt b/windows/README.txt deleted file mode 100644 index a7cd717..0000000 --- a/windows/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -cmake -DCMAKE_TOOLCHAIN_FILE=mingw64.cmake .. - -make kek-win32