Hello,

while trying to cross compile simh/pdp11 I found that the simh makefile would need some patches, so I build the pdp11 simulator with cmake. The main advantage of cmake is that is handles cross compiling nicely. Now I've added all simulators (but tested only a few of them) and since it doesn't interfere with the default makefile, maybe this patch is useful for someone else.
Full patch below.

Lothar


The default simh makefile has some issues when cross compiling for a different architecture. This patch adds CMakeLists.txt so the simh project can optionally be built with cmake.

Signed-off-by: Lothar Felten <[email protected]>
---
CMakeLists.txt | 697 ++++++++++++++++++++++++++++++++++++++++++++ CMakeSources.txt | 744 +++++++++++++++++++++++++++++++++++++++++++++++
 CMakeTestLargeFile.cmake |  32 ++
 3 files changed, 1473 insertions(+)
 create mode 100644 CMakeLists.txt
 create mode 100644 CMakeSources.txt
 create mode 100644 CMakeTestLargeFile.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..a891b47
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,697 @@
+#
+# CMakeLists for simh project
+#
+# The default simh makefile is not suited for cross compile
+#
+# usage (out of source build):
+#      - make directory next to simh sources
+#      - cmake <path to simh/CMakeLists.txt>
+#      - run make
+#
+#      example:
+#              git clone https://github.com/simh/simh
+#              mkdir build
+#              cd build
+#              cmake ../simh/
+#              make -j 8
+#
+# TODO:
+#      - add support for Windos/MacOS/...
+#      - fix besm6 true type font
+#      - testing
+#      - build the simulator core as independent library (requires
+#        code changes because the net/video option is handled at
+#        compile time)
+#
+# 2016 Lothar Felten <[email protected]>
+#
+cmake_minimum_required(VERSION 2.8.8)
+include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeSources.txt)
+project(simh)
+
+#
+# OPTIONS
+#
+option(BUILD_ALPHA             "build alpha               simulator" 
ON)#EXPERIMENTAL
+option(BUILD_ALTAIR            "build altair              simulator" ON)
+option(BUILD_ALTAIRZ80         "build altairz80   simulator" ON)
+option(BUILD_B5500             "build b5500               simulator" ON)
+option(BUILD_BESM6             "build besm6               simulator" ON)
+option(BUILD_CDC1700           "build cdc1700             simulator" ON)
+option(BUILD_ECLIPSE           "build eclipse             simulator" ON)
+option(BUILD_GRI               "build gri         simulator" ON)
+option(BUILD_H316              "build h316                simulator" ON)
+option(BUILD_HP2100            "build hp2100              simulator" ON)
+option(BUILD_HP3000            "build hp3000              simulator" ON)
+option(BUILD_I1401             "build i1401               simulator" ON)
+option(BUILD_I1620             "build i1620               simulator" ON)
+option(BUILD_I7094             "build i7094               simulator" ON)
+option(BUILD_IBM1130           "build ibm1130             simulator" ON)
+option(BUILD_ID16              "build id16                simulator" ON)
+option(BUILD_ID32              "build id32                simulator" ON)
+option(BUILD_ISYS8010          "build isys8010            simulator" ON)
+option(BUILD_ISYS8020          "build isys8020            simulator" ON)
+option(BUILD_LGP               "build lgp         simulator" ON)
+option(BUILD_MICROVAX1         "build microvax1   simulator" ON)
+option(BUILD_MICROVAX2         "build microvax2   simulator" ON)
+option(BUILD_MICROVAX3900      "build microvax3900        simulator" ON)
+option(BUILD_NOVA              "build nova                simulator" ON)
+option(BUILD_PDP1              "build pdp1                simulator" ON)
+option(BUILD_PDP4              "build pdp4                simulator" ON)
+option(BUILD_PDP7              "build pdp7                simulator" ON)
+option(BUILD_PDP8              "build pdp8                simulator" ON)
+option(BUILD_PDP9              "build pdp9                simulator" ON)
+option(BUILD_PDP10             "build pdp10               simulator" ON)
+option(BUILD_PDP11             "build pdp11               simulator" ON)
+option(BUILD_PDP15             "build pdp15               simulator" ON)
+option(BUILD_PDQ3              "build pdq3                simulator" 
ON)#EXPERIMENTAL
+option(BUILD_RTVAX1000         "build rtvax1000   simulator" ON)
+option(BUILD_S3                        "build s3          simulator" ON)
+option(BUILD_SAGE              "build sage                simulator" 
ON)#EXPERIMENTAL
+option(BUILD_SDS               "build sds         simulator" ON)
+option(BUILD_SIGMA             "build sigma               simulator" 
ON)#EXPERIMENTAL
+option(BUILD_SSEM              "build ssem                simulator" ON)
+option(BUILD_SWTP6800A         "build swtp6800a   simulator" ON)
+option(BUILD_SWTP6800A2                "build swtp6800a2  simulator" ON)
+option(BUILD_TX-0              "build tx-0                simulator" ON)
+option(BUILD_VAX               "build vax         simulator" ON)
+option(BUILD_VAX730            "build vax730              simulator" ON)
+option(BUILD_VAX750            "build vax750              simulator" ON)
+option(BUILD_VAX780            "build vax780              simulator" ON)
+option(BUILD_VAX8600           "build vax8600             simulator" ON)
+option(BUILD_ROMHEADERS        "build headers from ROM files" ON)
+option(ASYNC_IO                        "async io option (requires threads)" ON)
+option(VIDEO                   "video option (requires libSDL2)" ON)
+option(NETWORK                 "network option (requires libpcap, threads)" ON)
+
+#
+# DEBUG
+#
+# uncomment the next line to see the invoked commands and debug messages
+#set(DEBUG 1)
+if(DEBUG)
+       message("DEBUG ENABLED")
+       set(CMAKE_VERBOSE_MAKEFILE ON)
+endif(DEBUG)
+
+#
+# EXTERNAL LIBRARIES
+#
+# find out which libraries are available on the system
+# add each required library to the SYSTEM_LIBS list
+# add compiler flags depending on available libraries
+find_package(Threads)
+if(THREADS_FOUND)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_READER_THREAD")
+       set(SYSTEM_LIBS ${SYSTEM_LIBS} ${CMAKE_THREAD_LIBS_INIT})
+endif(THREADS_FOUND)
+
+find_package(PkgConfig)
+if(PKGCONFIG_FOUND)
+       pkg_check_modules(LIBPNG libpng)
+       if(LIBPNG_FOUND)
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_LIBPNG")
+               set(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBPNG_LIBRARIES})
+       endif(LIBPNG_FOUND)
+
+       pkg_check_modules(SDL2 sdl2)
+       if(SDL2_FOUND)
+               set(SYSTEM_LIBS ${SYSTEM_LIBS} ${SDL2_LIBRARIES}) # might be 
unused
+       endif(SDL2_FOUND)
+
+       pkg_check_modules(SDL2_TTF SDL2_ttf)
+       if(SDL2_TTF_FOUND)
+               set(SYSTEM_LIBS ${SYSTEM_LIBS} ${SDL2_TTF_LIBRARIES}) # might 
be unused
+       endif(SDL2_TTF_FOUND)
+
+       pkg_check_modules(LIBPCREPOSIX libpcreposix)
+       if(LIBPCREPOSIX_FOUND)
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_PCRE_POSIX")
+               set(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBPCREPOSIX_LIBRARIES})
+       endif(LIBPCREPOSIX_FOUND)
+
+       pkg_check_modules(LIBPCAP libpcap)
+       if(LIBPCAP_FOUND)
+               set(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBPCAP_LIBRARIES}) # might be 
unused
+       endif(LIBPCAP_FOUND)
+endif()
+
+find_library(DL_LIBRARY dl)
+if(DL_LIBRARY)
+       set(SYSTEM_LIBS ${SYSTEM_LIBS} ${DL_LIBRARY}) # might be unused
+       message(STATUS "system libraries: dl available")
+else()
+       message(STATUS "system libraries: dl not found")
+endif(DL_LIBRARY)
+
+find_library(RT_LIBRARY rt)
+if(RT_LIBRARY)
+       set(SYSTEM_LIBS ${SYSTEM_LIBS} ${RT_LIBRARY}) # might be unused
+       message(STATUS "system libraries: rt available")
+else()
+       message(STATUS "system libraries: rt not found")
+endif(RT_LIBRARY)
+
+#
+# EXTERNAL HEADERS
+#
+# find out which header files are available on the system
+# add compiler flagsdepending on available header files
+include(CheckIncludeFiles)
+check_include_files(regex.h HAVE_REGEX_H)
+check_include_files(dlfcn.h HAVE_DLOPEN_H)
+check_include_files(glob.h HAVE_GLOB_H)
+check_include_files(fnmatch.h HAVE_FNMATCH_H)
+check_include_files(sys/mman.h HAVE_SHM_OPEN_H)
+
+if(HAVE_REGEX_H)
+       if(NOT LIBPCREPOSIX_FOUND)
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_REGEX")
+ message(STATUS "system headers: regex.h available (no libpcre found, using regex)")
+       else(NOT LIBPCREPOSIX_FOUND)
+ message(STATUS "system headers: regex.h available (unused, using libpcre instead)")
+       endif(NOT LIBPCREPOSIX_FOUND)
+endif(HAVE_REGEX_H)
+
+if(HAVE_DLOPEN_H AND DL_LIBRARY)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_DLOPEN")
+       set(SYSTEM_LIBS ${SYSTEM_LIBS} ${DL_LIBRARY})
+endif(HAVE_DLOPEN_H AND DL_LIBRARY)
+
+if(HAVE_GLOB_H)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_GLOB")
+endif(HAVE_GLOB_H)
+
+if(HAVE_FNMATCH_H)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_FNMATCH")
+endif(HAVE_FNMATCH_H)
+
+if(HAVE_SHM_OPEN_H AND RT_LIBRARY)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_SHM_OPEN")
+       set(SYSTEM_LIBS ${SYSTEM_LIBS} ${RT_LIBRARY})
+endif(HAVE_SHM_OPEN_H AND RT_LIBRARY)
+
+#
+# PROJECT OPTIONS
+#
+# add compiler flags depending on available libraries and selected options
+
+#
+# PROJECT OPTIONS: ASYNC_IO?
+#
+if(ASYNC_IO AND THREADS_FOUND)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSIM_ASYNCH_IO")
+       message(STATUS "async io support available (threads found)")
+elseif(NOT (THREADS_FOUND))
+       message(STATUS "no async io support (threads required)")
+else()
+       message(STATUS "no async io support (disabled)")
+endif()
+
+#
+# PROJECT OPTIONS: NETWORK?
+#
+# check for libpcap and threads, set NETWORK_FLAGS
+if(NETWORK AND LIBPCAP_FOUND AND THREADS_FOUND)
+       set(NETWORK_FLAGS "-DUSE_NETWORK -DHAVE_PCAP_NETWORK")
+       message(STATUS "network support available (libpcap & threads found)")
+       set(ADD_NETWORK 1)
+elseif(NOT (LIBPCAP_FOUND AND THREADS_FOUND))
+       message(STATUS "no network support (libpcap & threads required)")
+else()
+       message(STATUS "no network support (disabled)")
+endif()
+
+#
+# PROJECT OPTIONS: VIDEO?
+#
+# check for libSDL2, set VIDEO_FLAGS
+if(VIDEO AND SDL2_FOUND)
+       find_path(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2)#TODO 
required?
+ set(VIDEO_FLAGS "-I${SDL2_INCLUDE_DIR} -DHAVE_LIBSDL -DUSE_SIM_VIDEO -DUSE_DISPLAY")
+       set(display_source_files
+               display/display.c
+               display/sim_ws.c
+       )
+       set(vt_source_files
+               display/vt11.c
+       )
+       set(ADD_VIDEO 1)
+       message(STATUS "video support available (libSDL2 found)")
+elseif(NOT SDL2_LIBRARY)
+       message(STATUS "no video support (libSDL2 required)")
+else()
+       message(STATUS "no video support (disabled)")
+endif()
+
+#
+# OS / COMPILER SPECIFIC
+#
+if(UNIX)
+       # generic unix target settings
+       include_directories(.)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-w") # suppress preprocessor warnings
+       include(CMakeTestLargeFile.cmake)
+       test_large_file_support(HAVE_LARGEFILE64_SOURCE)
+       if(HAVE_LARGEFILE64_SOURCE)
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE")
+       else()
+               message(FATAL_ERROR "toolchain has no LARGEFILE64 support")
+       endif(HAVE_LARGEFILE64_SOURCE)
+       # on unix the math lib libm is optional, add it:
+       find_library(MATH_LIBRARY m)
+       set(SYSTEM_LIBS ${SYSTEM_LIBS} ${MATH_LIBRARY})
+endif(UNIX)
+
+#
+# SYSTEM LIBRARIES HELPER FUNCTION
+#
+# this function calls target_link_libraries for each libaray in SYSTEM_LIBS
+# for the given target
+function(target_link_system_libs target)
+       foreach(loop_var ${SYSTEM_LIBS})
+               if(DEBUG)
+                       message("   target ${target}: add system lib: 
${loop_var}")
+               endif(DEBUG)
+               target_link_libraries(${target} ${loop_var})
+       endforeach(loop_var)
+endfunction()
+
+#
+# BUILD TARGETS
+#
+if(BUILD_ROMHEADERS)
+       add_executable(buildroms ${buildrom_source_files})
+       target_link_system_libs(buildroms)
+ file(COPY ${vax_rom_source_files} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/roms/VAX) + file(COPY ${pdp11_rom_source_files} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/roms/PDP11/lunar11) + file(COPY ${swtp6800_rom_source_files} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/roms/swtp6800/swtp6800) + add_custom_command(TARGET buildroms POST_BUILD COMMAND buildroms + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/roms COMMENT running buildroms VERBATIM)
+endif(BUILD_ROMHEADERS)
+
+if(BUILD_ALPHA)
+       add_executable(alpha ${alpha_source_files} ${simulator_source_files})
+ set_target_properties(alpha PROPERTIES COMPILE_FLAGS "-DUSE_ADDR64 -DUSE_INT64")
+       target_link_system_libs(alpha)
+       install (TARGETS alpha DESTINATION bin)
+endif(BUILD_ALPHA)
+
+if(BUILD_ALTAIR)
+       add_executable(altair ${altair_source_files} ${simulator_source_files})
+       target_link_system_libs(altair)
+       install (TARGETS altair DESTINATION bin)
+endif(BUILD_ALTAIR)
+
+if(BUILD_ALTAIRZ80)
+ add_executable(altairz80 ${altairz80_source_files} ${simulator_source_files})
+       set_target_properties(altairz80 PROPERTIES COMPILE_FLAGS 
"-DUSE_SIM_IMD")
+       target_link_system_libs(altairz80)
+       install (TARGETS altairz80 DESTINATION bin)
+endif(BUILD_ALTAIRZ80)
+
+if(BUILD_B5500)
+       add_executable(b5500 ${b5500_source_files} ${simulator_source_files})
+ set_target_properties(b5500 PROPERTIES COMPILE_FLAGS "-DUSE_INT64 -DB5500 -DUSE_SIM_CARD")
+       target_link_system_libs(b5500)
+       install (TARGETS b5500 DESTINATION bin)
+endif(BUILD_B5500)
+
+if(BUILD_BESM6)
+       add_executable(besm6 ${besm6_source_files} ${simulator_source_files})
+       set(BESM6_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_INT64")
+       if(ADD_VIDEO)
+               set(BESM6_C_FLAGS "${BESM6_C_FLAGS} ${VIDEO_FLAGS}")
+               set(BESM6_C_FLAGS "${BESM6_C_FLAGS} -DFONTFILE=DejaVuSans.ttf")
+       endif(ADD_VIDEO)
+       set_target_properties(besm6 PROPERTIES COMPILE_FLAGS "${BESM6_C_FLAGS}")
+       target_link_system_libs(besm6)
+       install (TARGETS besm6 DESTINATION bin)
+endif(BUILD_BESM6)
+
+if(BUILD_CDC1700)
+       add_executable(cdc1700 ${cdc1700_source_files} 
${simulator_source_files})
+ set_target_properties(cdc1700 PROPERTIES COMPILE_FLAGS "-DUSE_INT64 -Dcdc1700 -DUSE_SIM_CARD")
+       target_link_system_libs(cdc1700)
+       install (TARGETS cdc1700 DESTINATION bin)
+endif(BUILD_CDC1700)
+
+if(BUILD_ECLIPSE)
+       add_executable(eclipse ${eclipse_source_files} 
${simulator_source_files})
+       target_include_directories(eclipse PRIVATE NOVA)
+       target_link_system_libs(eclipse)
+       install (TARGETS eclipse DESTINATION bin)
+endif(BUILD_ECLIPSE)
+
+if(BUILD_GRI)
+       add_executable(gri ${gri_source_files} ${simulator_source_files})
+       set_target_properties(gri PROPERTIES COMPILE_FLAGS "-DVM_IMPTIP")
+       target_link_system_libs(gri)
+       install (TARGETS gri DESTINATION bin)
+endif(BUILD_GRI)
+
+if(BUILD_H316)
+       add_executable(h316 ${h316_source_files} ${simulator_source_files})
+       set_target_properties(h316 PROPERTIES COMPILE_FLAGS "-DVM_IMPTIP")
+       target_link_system_libs(h316)
+       install (TARGETS h316 DESTINATION bin)
+endif(BUILD_H316)
+
+if(BUILD_HP2100)
+       add_executable(hp2100 ${hp2100_source_files} ${simulator_source_files})
+       set_target_properties(hp2100 PROPERTIES COMPILE_FLAGS "-DHAVE_INT64")
+       target_link_system_libs(hp2100)
+       install (TARGETS hp2100 DESTINATION bin)
+endif(BUILD_HP2100)
+
+if(BUILD_HP3000)
+       add_executable(hp3000 ${hp3000_source_files} ${simulator_source_files})
+       target_link_system_libs(hp3000)
+       install (TARGETS hp3000 DESTINATION bin)
+endif(BUILD_HP3000)
+
+if(BUILD_I1401)
+       add_executable(i1401 ${i1401_source_files} ${simulator_source_files})
+       target_link_system_libs(i1401)
+       install (TARGETS i1401 DESTINATION bin)
+endif(BUILD_I1401)
+
+if(BUILD_I1620)
+       add_executable(i1620 ${i1620_source_files} ${simulator_source_files})
+       target_link_system_libs(i1620)
+       install (TARGETS i1620 DESTINATION bin)
+endif(BUILD_I1620)
+
+if(BUILD_I7094)
+       add_executable(i7094 ${i7094_source_files} ${simulator_source_files})
+       set_target_properties(i7094 PROPERTIES COMPILE_FLAGS "-DUSE_INT64")
+       target_link_system_libs(i7094)
+       install (TARGETS i7094 DESTINATION bin)
+endif(BUILD_I7094)
+
+if(BUILD_IBM1130)
+       add_executable(ibm1130 ${ibm1130_source_files} 
${simulator_source_files})
+       target_link_system_libs(ibm1130)
+       install (TARGETS ibm1130 DESTINATION bin)
+endif(BUILD_IBM1130)
+
+if(BUILD_ID16)
+       add_executable(id16 ${id16_source_files} ${simulator_source_files})
+       target_link_system_libs(id16)
+       install (TARGETS id16 DESTINATION bin)
+endif(BUILD_ID16)
+
+if(BUILD_ID32)
+       add_executable(id32 ${id32_source_files} ${simulator_source_files})
+       target_link_system_libs(id32)
+       install (TARGETS id32 DESTINATION bin)
+endif(BUILD_ID32)
+
+if(BUILD_ISYS8010)
+ add_executable(isys8010 ${isys8010_source_files} ${simulator_source_files})
+       target_include_directories(isys8010 PRIVATE Intel-Systems/isys8010)
+       target_link_system_libs(isys8010)
+       install (TARGETS isys8010 DESTINATION bin)
+endif(BUILD_ISYS8010)
+
+if(BUILD_ISYS8020)
+ add_executable(isys8020 ${isys8020_source_files} ${simulator_source_files})
+       target_include_directories(isys8020 PRIVATE Intel-Systems/isys8020)
+       target_link_system_libs(isys8020)
+       install (TARGETS isys8020 DESTINATION bin)
+endif(BUILD_ISYS8020)
+
+if(BUILD_LGP)
+       add_executable(lgp ${lgp_source_files} ${simulator_source_files})
+       set_target_properties(lgp PROPERTIES COMPILE_FLAGS "-DVM_IMPTIP")
+       target_link_system_libs(lgp)
+       install (TARGETS lgp DESTINATION bin)
+endif(BUILD_LGP)
+
+if(BUILD_MICROVAX1)
+ add_executable(microvax1 ${microvax1_source_files} ${vax_qbus_source_files} ${simulator_source_files})
+       target_include_directories(microvax1 PRIVATE PDP11)
+       target_include_directories(microvax1 PRIVATE VAX)
+ set(MICROVAX1_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_610 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(MICROVAX1_C_FLAGS "${MICROVAX1_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       if(ADD_VIDEO)
+               set(MICROVAX1_C_FLAGS "${MICROVAX1_C_FLAGS} ${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+ set_target_properties(microvax1 PROPERTIES COMPILE_FLAGS "${MICROVAX1_C_FLAGS}")
+       target_link_system_libs(microvax1)
+       install (TARGETS microvax1 DESTINATION bin)
+endif(BUILD_MICROVAX1)
+
+if(BUILD_MICROVAX2)
+ add_executable(microvax2 ${microvax2_source_files} ${vax_qbus_source_files} ${simulator_source_files})
+       target_include_directories(microvax2 PRIVATE PDP11)
+       target_include_directories(microvax2 PRIVATE VAX)
+ set(MICROVAX2_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_630 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(MICROVAX2_C_FLAGS "${MICROVAX2_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       if(ADD_VIDEO)
+               set(MICROVAX2_C_FLAGS "${MICROVAX2_C_FLAGS} ${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+ set_target_properties(microvax2 PROPERTIES COMPILE_FLAGS "${MICROVAX2_C_FLAGS}")
+       target_link_system_libs(microvax2)
+       install (TARGETS microvax2 DESTINATION bin)
+endif(BUILD_MICROVAX2)
+
+if(BUILD_MICROVAX3900)
+ add_executable(microvax3900 ${vax_source_files} ${vax_qbus_source_files} ${simulator_source_files})
+       target_include_directories(microvax3900 PRIVATE PDP11)
+       target_include_directories(microvax3900 PRIVATE VAX)
+ set(MICROVAX3900_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(MICROVAX3900_C_FLAGS "${MICROVAX3900_C_FLAGS} 
${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       if(ADD_VIDEO)
+               set(MICROVAX3900_C_FLAGS "${MICROVAX3900_C_FLAGS} 
${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+ set_target_properties(microvax3900 PROPERTIES COMPILE_FLAGS "${MICROVAX3900_C_FLAGS}")
+       target_link_system_libs(microvax3900)
+       install (TARGETS microvax3900 DESTINATION bin)
+endif(BUILD_MICROVAX3900)
+
+if(BUILD_NOVA)
+       add_executable(nova ${nova_source_files} ${simulator_source_files})
+       target_link_system_libs(nova)
+       install (TARGETS nova DESTINATION bin)
+endif(BUILD_NOVA)
+
+if(BUILD_PDP1)
+ add_executable(pdp1 ${pdp1_source_files} ${simulator_source_files} ${display_source_files})
+       set(PDP1_C_FLAGS "${CMAKE_C_FLAGS}")
+       if(ADD_VIDEO)
+ set(PDP1_C_FLAGS "${PDP1_C_FLAGS} -DDISPLAY_TYPE=DIS_TYPE30 -DPIX_SCALE=RES_HALF")
+               set(PDP1_C_FLAGS "${PDP1_C_FLAGS} ${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+       set_target_properties(pdp1 PROPERTIES COMPILE_FLAGS "${PDP1_C_FLAGS}")
+       target_link_system_libs(pdp1)
+       install (TARGETS pdp1 DESTINATION bin)
+endif(BUILD_PDP1)
+
+if(BUILD_PDP4)
+       add_executable(pdp4 ${pdp18b_source_files} ${simulator_source_files})
+       set_target_properties(pdp4 PROPERTIES COMPILE_FLAGS "-DPDP4")
+       target_link_system_libs(pdp4)
+       install (TARGETS pdp4 DESTINATION bin)
+endif(BUILD_PDP4)
+
+if(BUILD_PDP7)
+       add_executable(pdp7 ${pdp18b_source_files} ${simulator_source_files})
+       set_target_properties(pdp7 PROPERTIES COMPILE_FLAGS "-DPDP7")
+       target_link_system_libs(pdp7)
+       install (TARGETS pdp7 DESTINATION bin)
+endif(BUILD_PDP7)
+
+if(BUILD_PDP8)
+       add_executable(pdp8 ${pdp8_source_files} ${simulator_source_files})
+       target_link_system_libs(pdp8)
+       install (TARGETS pdp8 DESTINATION bin)
+endif(BUILD_PDP8)
+
+if(BUILD_PDP9)
+       add_executable(pdp9 ${pdp18b_source_files} ${simulator_source_files})
+       set_target_properties(pdp9 PROPERTIES COMPILE_FLAGS "-DPDP9")
+       target_link_system_libs(pdp9)
+       install (TARGETS pdp9 DESTINATION bin)
+endif(BUILD_PDP9)
+
+if(BUILD_PDP10)
+       add_executable(pdp10 ${pdp10_source_files} ${simulator_source_files})
+       target_include_directories(pdp10 PRIVATE PDP10)
+       set(PDP10_C_FLAGS "${CMAKE_C_FLAGS} -DVM_PDP10 -DUSE_INT64")
+       if(ADD_NETWORK)
+               set(PDP10_C_FLAGS "${PDP10_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       set_target_properties(pdp10 PROPERTIES COMPILE_FLAGS "${PDP10_C_FLAGS}")
+       target_link_system_libs(pdp10)
+       install (TARGETS pdp10 DESTINATION bin)
+endif(BUILD_PDP10)
+
+if(BUILD_PDP11)
+ add_executable(pdp11 ${pdp11_source_files} ${simulator_source_files} ${display_source_files} ${vt_source_files})
+       set(PDP11_C_FLAGS "${CMAKE_C_FLAGS} -DVM_PDP11")
+       if(ADD_NETWORK)
+               set(PDP11_C_FLAGS "${PDP11_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       if(ADD_VIDEO)
+               set(PDP11_C_FLAGS "${PDP11_C_FLAGS} ${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+       set_target_properties(pdp11 PROPERTIES COMPILE_FLAGS "${PDP11_C_FLAGS}")
+       target_link_system_libs(pdp11)
+       install (TARGETS pdp11 DESTINATION bin)
+endif(BUILD_PDP11)
+
+if(BUILD_PDP15)
+       add_executable(pdp15 ${pdp18b_source_files} ${simulator_source_files})
+       set_target_properties(pdp15 PROPERTIES COMPILE_FLAGS "-DPDP15")
+       target_link_system_libs(pdp15)
+       install (TARGETS pdp15 DESTINATION bin)
+endif(BUILD_PDP15)
+
+if(BUILD_PDQ3)
+       add_executable(pdq3 ${pdq3_source_files} ${simulator_source_files})
+       set_target_properties(pdq3 PROPERTIES COMPILE_FLAGS "-DUSE_SIM_IMD")
+       target_link_system_libs(pdq3)
+       install (TARGETS pdq3 DESTINATION bin)
+endif(BUILD_PDQ3)
+
+if(BUILD_RTVAX1000)
+ add_executable(rtvax1000 ${microvax2_source_files} ${vax_qbus_source_files} ${simulator_source_files})
+       target_include_directories(rtvax1000 PRIVATE PDP11)
+       target_include_directories(rtvax1000 PRIVATE VAX)
+ set(RTVAX1000_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_620 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(RTVAX1000_C_FLAGS "${RTVAX1000_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+ set_target_properties(rtvax1000 PROPERTIES COMPILE_FLAGS "${RTVAX1000_C_FLAGS}")
+       target_link_system_libs(rtvax1000)
+       install (TARGETS rtvax1000 DESTINATION bin)
+endif(BUILD_RTVAX1000)
+
+if(BUILD_S3)
+       add_executable(s3 ${s3_source_files} ${simulator_source_files})
+       target_link_system_libs(s3)
+       install (TARGETS s3 DESTINATION bin)
+endif(BUILD_S3)
+
+if(BUILD_SAGE)
+       add_executable(sage ${sage_source_files} ${simulator_source_files})
+ set_target_properties(sage PROPERTIES COMPILE_FLAGS "-DHAVE_INT64 -DUSE_SIM_IMD")
+       target_link_system_libs(sage)
+       install (TARGETS sage DESTINATION bin)
+endif(BUILD_SAGE)
+
+if(BUILD_SDS)
+       add_executable(sds ${sds_source_files} ${simulator_source_files})
+       target_link_system_libs(sds)
+       install (TARGETS sds DESTINATION bin)
+endif(BUILD_SDS)
+
+if(BUILD_SIGMA)
+       add_executable(sigma ${sigma_source_files} ${simulator_source_files})
+       target_link_system_libs(sigma)
+       install (TARGETS sigma DESTINATION bin)
+endif(BUILD_SIGMA)
+
+if(BUILD_SSEM)
+       add_executable(ssem ${ssem_source_files} ${simulator_source_files})
+       target_link_system_libs(ssem)
+       install (TARGETS ssem DESTINATION bin)
+endif(BUILD_SSEM)
+
+if(BUILD_SWTP6800A)
+ add_executable(swtp6800a ${swtp6800a_source_files} ${simulator_source_files})
+       target_include_directories(swtp6800a PRIVATE swtp6800/swtp6800)
+       target_link_system_libs(swtp6800a)
+       install (TARGETS swtp6800a DESTINATION bin)
+endif(BUILD_SWTP6800A)
+
+if(BUILD_SWTP6800A2)
+ add_executable(swtp6800a2 ${swtp6800a2_source_files} ${simulator_source_files})
+       target_include_directories(swtp6800a2 PRIVATE swtp6800/swtp6800)
+       target_link_system_libs(swtp6800a2)
+       install (TARGETS swtp6800a2 DESTINATION bin)
+endif(BUILD_SWTP6800A2)
+
+if(BUILD_TX-0)
+ add_executable(tx-0 ${tx-0_source_files} ${simulator_source_files} ${display_source_files})
+       if(ADD_VIDEO)
+ set_target_properties(tx-0 PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+       target_link_system_libs(tx-0)
+       install (TARGETS tx-0 DESTINATION bin)
+endif(BUILD_TX-0)
+
+if(BUILD_VAX)
+ add_executable(vax ${vax_source_files} ${vax_qbus_source_files} ${simulator_source_files})
+       target_include_directories(vax PRIVATE PDP11)
+       target_include_directories(vax PRIVATE VAX)
+       set(VAX_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(VAX_C_FLAGS "${VAX_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       if(ADD_VIDEO)
+               set(VAX_C_FLAGS "${VAX_C_FLAGS} ${VIDEO_FLAGS}")
+       endif(ADD_VIDEO)
+       set_target_properties(vax PROPERTIES COMPILE_FLAGS "${VAX_C_FLAGS}")
+       target_link_system_libs(vax)
+       install (TARGETS vax DESTINATION bin)
+endif(BUILD_VAX)
+
+if(BUILD_VAX730)
+ add_executable(vax730 ${vax730_source_files} ${vax_unibus_source_files} ${simulator_source_files})
+       target_include_directories(vax730 PRIVATE PDP11)
+       target_include_directories(vax730 PRIVATE VAX)
+ set(VAX730_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_730 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(VAX730_C_FLAGS "${VAX730_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       set_target_properties(vax730 PROPERTIES COMPILE_FLAGS 
"${VAX730_C_FLAGS}")
+       target_link_system_libs(vax730)
+       install (TARGETS vax730 DESTINATION bin)
+endif(BUILD_VAX730)
+
+if(BUILD_VAX750)
+ add_executable(vax750 ${vax750_source_files} ${vax_massbus_source_files} ${vax_unibus_source_files} ${simulator_source_files})
+       target_include_directories(vax750 PRIVATE PDP11)
+       target_include_directories(vax750 PRIVATE VAX)
+ set(VAX750_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_750 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(VAX750_C_FLAGS "${VAX750_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       set_target_properties(vax750 PROPERTIES COMPILE_FLAGS 
"${VAX750_C_FLAGS}")
+       target_link_system_libs(vax750)
+       install (TARGETS vax750 DESTINATION bin)
+endif(BUILD_VAX750)
+
+if(BUILD_VAX780)
+ add_executable(vax780 ${vax780_source_files} ${vax_massbus_source_files} ${vax_unibus_source_files} ${simulator_source_files})
+       target_include_directories(vax780 PRIVATE PDP11)
+       target_include_directories(vax780 PRIVATE VAX)
+ set(VAX780_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_780 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(VAX780_C_FLAGS "${VAX780_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+       set_target_properties(vax780 PROPERTIES COMPILE_FLAGS 
"${VAX780_C_FLAGS}")
+       target_link_system_libs(vax780)
+       install (TARGETS vax780 DESTINATION bin)
+endif(BUILD_VAX780)
+
+if(BUILD_VAX8600)
+ add_executable(vax8600 ${vax8600_source_files} ${vax_massbus_source_files} ${vax_unibus_source_files} ${simulator_source_files})
+       target_include_directories(vax8600 PRIVATE PDP11)
+       target_include_directories(vax8600 PRIVATE VAX)
+ set(VAX8600_C_FLAGS "${CMAKE_C_FLAGS} -DVM_VAX -DVAX_860 -DUSE_INT64 -DUSE_ADDR64")
+       if(ADD_NETWORK)
+               set(VAX8600_C_FLAGS "${VAX8600_C_FLAGS} ${NETWORK_FLAGS}")
+       endif(ADD_NETWORK)
+ set_target_properties(vax8600 PROPERTIES COMPILE_FLAGS "${VAX8600_C_FLAGS}")
+       target_link_system_libs(vax8600)
+       install (TARGETS vax8600 DESTINATION bin)
+endif(BUILD_VAX8600)
diff --git a/CMakeSources.txt b/CMakeSources.txt
new file mode 100644
index 0000000..a0806a1
--- /dev/null
+++ b/CMakeSources.txt
@@ -0,0 +1,744 @@
+#
+# SIMULATOR FILES
+#
+set(simulator_source_files
+       scp.c
+       sim_console.c
+       sim_fio.c
+       sim_timer.c
+       sim_sock.c
+       sim_tmxr.c
+       sim_ether.c
+       sim_tape.c
+       sim_disk.c
+       sim_serial.c
+       sim_imd.c
+       sim_card.c
+       sim_video.c
+)
+
+#
+# BUILDROM FILES
+#
+set(buildrom_source_files
+       sim_BuildROMs.c
+)
+set(vax_rom_source_files
+       VAX/ka620.bin
+       VAX/ka750_new.bin
+       VAX/ka610.bin
+       VAX/ka655x.bin
+       VAX/ka630.bin
+       VAX/ka750_old.bin
+       VAX/vmb.exe
+)
+set(swtp6800_rom_source_files
+       swtp6800/swtp6800/swtbug.bin
+)
+set(pdp11_rom_source_files
+       PDP11/lunar11/lunar.lda
+)
+
+#
+# MACHINE FILES
+#
+set(alpha_source_files
+       alpha/alpha_500au_syslist.c
+       alpha/alpha_cpu.c
+       alpha/alpha_ev5_cons.c
+       alpha/alpha_ev5_pal.c
+       alpha/alpha_ev5_tlb.c
+       alpha/alpha_fpi.c
+       alpha/alpha_fpv.c
+       alpha/alpha_io.c
+       alpha/alpha_mmu.c
+       alpha/alpha_sys.c
+)
+set(altair_source_files
+       ALTAIR/altair_cpu.c
+       ALTAIR/altair_dsk.c
+       ALTAIR/altair_sio.c
+       ALTAIR/altair_sys.c
+)
+set(altairz80_source_files
+       AltairZ80/altairz80_cpu.c
+       AltairZ80/altairz80_cpu_nommu.c
+       AltairZ80/altairz80_dsk.c
+       AltairZ80/altairz80_hdsk.c
+       AltairZ80/altairz80_mhdsk.c
+       AltairZ80/altairz80_net.c
+       AltairZ80/altairz80_sio.c
+       AltairZ80/altairz80_sys.c
+       AltairZ80/disasm.c
+       AltairZ80/flashwriter2.c
+       AltairZ80/i8272.c
+       AltairZ80/i86_decode.c
+       AltairZ80/i86_ops.c
+       AltairZ80/i86_prim_ops.c
+       AltairZ80/insnsd.c
+       AltairZ80/m68kcpu.c
+       AltairZ80/m68kdasm.c
+       AltairZ80/m68kopac.c
+       AltairZ80/m68kopdm.c
+       AltairZ80/m68kopnz.c
+       AltairZ80/m68kops.c
+       AltairZ80/m68ksim.c
+       AltairZ80/mfdc.c
+       AltairZ80/n8vem.c
+       AltairZ80/s100_64fdc.c
+       AltairZ80/s100_adcs6.c
+       AltairZ80/s100_disk1a.c
+       AltairZ80/s100_disk2.c
+       AltairZ80/s100_disk3.c
+       AltairZ80/s100_fif.c
+       AltairZ80/s100_hdc1001.c
+       AltairZ80/s100_if3.c
+       AltairZ80/s100_mdriveh.c
+       AltairZ80/s100_mdsa.c
+       AltairZ80/s100_mdsad.c
+       AltairZ80/s100_scp300f.c
+       AltairZ80/s100_selchan.c
+       AltairZ80/s100_ss1.c
+       AltairZ80/vfdhd.c
+       AltairZ80/wd179x.c
+)
+set(b5500_source_files
+       B5500/b5500_cpu.c
+       B5500/b5500_dk.c
+       B5500/b5500_dr.c
+       B5500/b5500_dtc.c
+       B5500/b5500_io.c
+       B5500/b5500_mt.c
+       B5500/b5500_sys.c
+       B5500/b5500_urec.c
+)
+set(besm6_source_files
+       BESM6/besm6_arith.c
+       BESM6/besm6_cpu.c
+       BESM6/besm6_disk.c
+       BESM6/besm6_drum.c
+       BESM6/besm6_mmu.c
+       BESM6/besm6_panel.c
+       BESM6/besm6_printer.c
+       BESM6/besm6_punch.c
+       BESM6/besm6_sys.c
+       BESM6/besm6_tty.c
+)
+set(cdc1700_source_files
+       CDC1700/cdc1700_cd.c
+       CDC1700/cdc1700_cpu.c
+       CDC1700/cdc1700_dc.c
+       CDC1700/cdc1700_dev1.c
+       CDC1700/cdc1700_dis.c
+       CDC1700/cdc1700_dp.c
+       CDC1700/cdc1700_io.c
+       CDC1700/cdc1700_iofw.c
+       CDC1700/cdc1700_lp.c
+       CDC1700/cdc1700_mt.c
+       CDC1700/cdc1700_rtc.c
+       CDC1700/cdc1700_sym.c
+       CDC1700/cdc1700_sys.c
+)
+set(eclipse_source_files
+       NOVA/nova_clk.c
+       NOVA/eclipse_cpu.c
+       NOVA/nova_dkp.c
+       NOVA/nova_dsk.c
+       NOVA/nova_lp.c
+       NOVA/nova_mta.c
+       NOVA/nova_plt.c
+       NOVA/nova_pt.c
+       NOVA/nova_qty.c
+       NOVA/nova_sys.c
+       NOVA/nova_tt1.c
+       NOVA/eclipse_tt.c
+)
+set(gri_source_files
+       GRI/gri_cpu.c
+       GRI/gri_stddev.c
+       GRI/gri_sys.c
+)
+set(h316_source_files
+       H316/h316_cpu.c
+       H316/h316_dp.c
+       H316/h316_fhd.c
+       H316/h316_hi.c
+       H316/h316_imp.c
+       H316/h316_lp.c
+       H316/h316_mi.c
+       H316/h316_mt.c
+       H316/h316_rtc.c
+       H316/h316_stddev.c
+       H316/h316_sys.c
+       H316/h316_udp.c
+)
+set(hp2100_source_files
+       HP2100/hp2100_baci.c
+       HP2100/hp2100_cpu0.c
+       HP2100/hp2100_cpu1.c
+       HP2100/hp2100_cpu2.c
+       HP2100/hp2100_cpu3.c
+       HP2100/hp2100_cpu4.c
+       HP2100/hp2100_cpu5.c
+       HP2100/hp2100_cpu6.c
+       HP2100/hp2100_cpu7.c
+       HP2100/hp2100_cpu.c
+       HP2100/hp2100_di.c
+       HP2100/hp2100_di_da.c
+       HP2100/hp2100_disclib.c
+       HP2100/hp2100_dp.c
+       HP2100/hp2100_dq.c
+       HP2100/hp2100_dr.c
+       HP2100/hp2100_ds.c
+       HP2100/hp2100_fp1.c
+       HP2100/hp2100_fp.c
+       HP2100/hp2100_ipl.c
+       HP2100/hp2100_lps.c
+       HP2100/hp2100_lpt.c
+       HP2100/hp2100_mpx.c
+       HP2100/hp2100_ms.c
+       HP2100/hp2100_mt.c
+       HP2100/hp2100_mux.c
+       HP2100/hp2100_pif.c
+       HP2100/hp2100_stddev.c
+       HP2100/hp2100_sys.c
+)
+set(hp3000_source_files
+       HP3000/hp3000_atc.c
+       HP3000/hp3000_clk.c
+       HP3000/hp3000_cpu_base.c
+       HP3000/hp3000_cpu.c
+       HP3000/hp3000_cpu_fp.c
+       HP3000/hp3000_ds.c
+       HP3000/hp3000_iop.c
+       HP3000/hp3000_lp.c
+       HP3000/hp3000_mpx.c
+       HP3000/hp3000_ms.c
+       HP3000/hp3000_scmb.c
+       HP3000/hp3000_sel.c
+       HP3000/hp3000_sys.c
+       HP3000/hp_disclib.c
+       HP3000/hp_tapelib.c
+)
+set(i1401_source_files
+       I1401/i1401_cd.c
+       I1401/i1401_cpu.c
+       I1401/i1401_dp.c
+       I1401/i1401_iq.c
+       I1401/i1401_lp.c
+       I1401/i1401_mt.c
+       I1401/i1401_sys.c
+)
+set(i1620_source_files
+       I1620/i1620_cd.c
+       I1620/i1620_cpu.c
+       I1620/i1620_dp.c
+       I1620/i1620_fp.c
+       I1620/i1620_lp.c
+       I1620/i1620_pt.c
+       I1620/i1620_sys.c
+       I1620/i1620_tty.c
+)
+set(i7094_source_files
+       I7094/i7094_binloader.c
+       I7094/i7094_cd.c
+       I7094/i7094_clk.c
+       I7094/i7094_com.c
+       I7094/i7094_cpu1.c
+       I7094/i7094_cpu.c
+       I7094/i7094_drm.c
+       I7094/i7094_dsk.c
+       I7094/i7094_io.c
+       I7094/i7094_lp.c
+       I7094/i7094_mt.c
+       I7094/i7094_sys.c
+)
+set(ibm1130_source_files
+       Ibm1130/ibm1130_cpu.c
+       Ibm1130/ibm1130_cr.c
+       Ibm1130/ibm1130_disk.c
+       Ibm1130/ibm1130_fmt.c
+       Ibm1130/ibm1130_gdu.c
+       Ibm1130/ibm1130_gui.c
+       Ibm1130/ibm1130_plot.c
+       Ibm1130/ibm1130_prt.c
+       Ibm1130/ibm1130_ptrp.c
+       Ibm1130/ibm1130_sca.c
+       Ibm1130/ibm1130_stddev.c
+       Ibm1130/ibm1130_sys.c
+       Ibm1130/ibm1130_t2741.c
+)
+set(id16_source_files
+       Interdata/id16_cpu.c
+       Interdata/id16_dboot.c
+       Interdata/id16_sys.c
+       Interdata/id_dp.c
+       Interdata/id_fd.c
+       Interdata/id_fp.c
+       Interdata/id_idc.c
+       Interdata/id_io.c
+       Interdata/id_lp.c
+       Interdata/id_mt.c
+       Interdata/id_pas.c
+       Interdata/id_pt.c
+       Interdata/id_tt.c
+       Interdata/id_ttp.c
+       Interdata/id_uvc.c
+)
+set(id32_source_files
+       Interdata/id32_cpu.c
+       Interdata/id32_dboot.c
+       Interdata/id32_sys.c
+       Interdata/id_dp.c
+       Interdata/id_fd.c
+       Interdata/id_fp.c
+       Interdata/id_idc.c
+       Interdata/id_io.c
+       Interdata/id_lp.c
+       Interdata/id_mt.c
+       Interdata/id_pas.c
+       Interdata/id_pt.c
+       Interdata/id_tt.c
+       Interdata/id_ttp.c
+       Interdata/id_uvc.c
+)
+set(isys8010_source_files
+       Intel-Systems/isys8010/isys8010_sys.c
+       Intel-Systems/common/i8080.c
+       Intel-Systems/common/i8251.c
+       Intel-Systems/common/i8255.c
+       Intel-Systems/common/ieprom.c
+       Intel-Systems/common/iram8.c
+       Intel-Systems/common/isbc064.c
+       Intel-Systems/common/isbc208.c
+       Intel-Systems/common/isbc80-10.c
+       Intel-Systems/common/multibus.c
+)
+set(isys8020_source_files
+       Intel-Systems/isys8020/isys8020_sys.c
+       Intel-Systems/common/i8080.c
+       Intel-Systems/common/i8251.c
+       Intel-Systems/common/i8255.c
+       Intel-Systems/common/i8259.c
+       Intel-Systems/common/ieprom.c
+       Intel-Systems/common/iram8.c
+       Intel-Systems/common/isbc064.c
+       Intel-Systems/common/isbc208.c
+       Intel-Systems/common/isbc80-20.c
+       Intel-Systems/common/multibus.c
+)
+set(lgp_source_files
+       LGP/lgp_cpu.c
+       LGP/lgp_stddev.c
+       LGP/lgp_sys.c
+)
+set(microvax3900_source_files
+       VAX/vax_2681.c
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_io.c
+       VAX/vax_lk.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_stddev.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax_sysdev.c
+       VAX/vax_syslist.c
+       VAX/vax_vc.c
+       VAX/vax_vs.c
+)
+set(microvax1_source_files
+       VAX/vax_2681.c
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_lk.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax_vc.c
+       VAX/vax_vs.c
+       VAX/vax610_io.c
+       VAX/vax610_mem.c
+       VAX/vax610_stddev.c
+       VAX/vax610_sysdev.c
+       VAX/vax610_syslist.c
+)
+set(microvax2_source_files
+       VAX/vax_2681.c
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_lk.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax_vc.c
+       VAX/vax_vs.c
+       VAX/vax_watch.c
+       VAX/vax630_io.c
+       VAX/vax630_stddev.c
+       VAX/vax630_sysdev.c
+       VAX/vax630_syslist.c
+)
+set(nova_source_files
+       NOVA/nova_clk.c
+       NOVA/nova_cpu.c
+       NOVA/nova_dkp.c
+       NOVA/nova_dsk.c
+       NOVA/nova_lp.c
+       NOVA/nova_mta.c
+       NOVA/nova_plt.c
+       NOVA/nova_pt.c
+       NOVA/nova_qty.c
+       NOVA/nova_sys.c
+       NOVA/nova_tt1.c
+       NOVA/nova_tt.c
+)
+set(pdp1_source_files
+       PDP1/pdp1_clk.c
+       PDP1/pdp1_cpu.c
+       PDP1/pdp1_dcs.c
+       PDP1/pdp1_defs.h
+       PDP1/pdp1_diag.txt
+       PDP1/pdp1_dpy.c
+       PDP1/pdp1_drm.c
+       PDP1/pdp1_dt.c
+       PDP1/pdp1_lp.c
+       PDP1/pdp1_stddev.c
+       PDP1/pdp1_sys.c
+)
+set(pdp8_source_files
+       PDP8/pdp8_clk.c
+       PDP8/pdp8_cpu.c
+       PDP8/pdp8_ct.c
+       PDP8/pdp8_df.c
+       PDP8/pdp8_dt.c
+       PDP8/pdp8_fpp.c
+       PDP8/pdp8_lp.c
+       PDP8/pdp8_mt.c
+       PDP8/pdp8_pt.c
+       PDP8/pdp8_rf.c
+       PDP8/pdp8_rk.c
+       PDP8/pdp8_rl.c
+       PDP8/pdp8_rx.c
+       PDP8/pdp8_sys.c
+       PDP8/pdp8_td.c
+       PDP8/pdp8_tsc.c
+       PDP8/pdp8_tt.c
+       PDP8/pdp8_ttx.c
+)
+set(pdp10_source_files
+       PDP10/pdp10_fe.c
+       PDP10/pdp10_cpu.c
+       PDP10/pdp10_ksio.c
+       PDP10/pdp10_lp20.c
+       PDP10/pdp10_mdfp.c
+       PDP10/pdp10_pag.c
+       PDP10/pdp10_rp.c
+       PDP10/pdp10_sys.c
+       PDP10/pdp10_tim.c
+       PDP10/pdp10_tu.c
+       PDP10/pdp10_xtnd.c
+       PDP11/pdp11_pt.c
+       PDP11/pdp11_ry.c
+       PDP11/pdp11_cr.c
+       PDP11/pdp11_dup.c
+       PDP11/pdp11_dmc.c
+       PDP11/pdp11_kmc.c
+       PDP11/pdp11_xu.c
+       PDP11/pdp11_dz.c
+)
+set(pdp11_source_files
+       PDP11/pdp11_cis.c
+       PDP11/pdp11_cpu.c
+       PDP11/pdp11_cpumod.c
+       PDP11/pdp11_cr.c
+       PDP11/pdp11_dc.c
+       PDP11/pdp11_dl.c
+       PDP11/pdp11_dmc.c
+       PDP11/pdp11_dup.c
+       PDP11/pdp11_dz.c
+       PDP11/pdp11_fp.c
+       PDP11/pdp11_hk.c
+       PDP11/pdp11_io.c
+       PDP11/pdp11_io_lib.c
+       PDP11/pdp11_ke.c
+       PDP11/pdp11_kg.c
+       PDP11/pdp11_kmc.c
+       PDP11/pdp11_lp.c
+       PDP11/pdp11_pclk.c
+       PDP11/pdp11_pt.c
+       PDP11/pdp11_rc.c
+       PDP11/pdp11_rf.c
+       PDP11/pdp11_rh.c
+       PDP11/pdp11_rk.c
+       PDP11/pdp11_rl.c
+       PDP11/pdp11_rp.c
+       PDP11/pdp11_rq.c
+       PDP11/pdp11_rs.c
+       PDP11/pdp11_rx.c
+       PDP11/pdp11_ry.c
+       PDP11/pdp11_stddev.c
+       PDP11/pdp11_sys.c
+       PDP11/pdp11_ta.c
+       PDP11/pdp11_tc.c
+       PDP11/pdp11_td.c
+       PDP11/pdp11_tm.c
+       PDP11/pdp11_tq.c
+       PDP11/pdp11_ts.c
+       PDP11/pdp11_tu.c
+       PDP11/pdp11_vh.c
+       PDP11/pdp11_vt.c
+       PDP11/pdp11_xq.c
+       PDP11/pdp11_xu.c
+)
+set(pdp18b_source_files
+       PDP18B/pdp18b_cpu.c
+       PDP18B/pdp18b_drm.c
+       PDP18B/pdp18b_dt.c
+       PDP18B/pdp18b_fpp.c
+       PDP18B/pdp18b_g2tty.c
+       PDP18B/pdp18b_lp.c
+       PDP18B/pdp18b_mt.c
+       PDP18B/pdp18b_rb.c
+       PDP18B/pdp18b_rf.c
+       PDP18B/pdp18b_rp.c
+       PDP18B/pdp18b_stddev.c
+       PDP18B/pdp18b_sys.c
+       PDP18B/pdp18b_tt1.c
+)
+set(pdq3_source_files
+       PDQ-3/pdq3_cpu.c
+       PDQ-3/pdq3_debug.c
+       PDQ-3/pdq3_fdc.c
+       PDQ-3/pdq3_mem.c
+       PDQ-3/pdq3_stddev.c
+       PDQ-3/pdq3_sys.c
+)
+set(s3_source_files
+       S3/s3_cd.c
+       S3/s3_cpu.c
+       S3/s3_disk.c
+       S3/s3_lp.c
+       S3/s3_pkb.c
+       S3/s3_sys.c
+)
+set(sage_source_files
+       SAGE/i8251.c
+       SAGE/i8253.c
+       SAGE/i8255.c
+       SAGE/i8259.c
+       SAGE/i8272.c
+       SAGE/m68k_cpu.c
+       SAGE/m68k_mem.c
+       SAGE/m68k_parse.tab.c
+       SAGE/m68k_scp.c
+       SAGE/m68k_sys.c
+       SAGE/sage_aux.c
+       SAGE/sage_cons.c
+       SAGE/sage_cpu.c
+       SAGE/sage_fd.c
+       SAGE/sage_hd.c
+       SAGE/sage_ieee.c
+       SAGE/sage_lp.c
+       SAGE/sage_stddev.c
+       SAGE/sage_sys.c
+)
+set(sds_source_files
+       SDS/sds_cpu.c
+       SDS/sds_drm.c
+       SDS/sds_dsk.c
+       SDS/sds_io.c
+       SDS/sds_lp.c
+       SDS/sds_mt.c
+       SDS/sds_mux.c
+       SDS/sds_rad.c
+       SDS/sds_stddev.c
+       SDS/sds_sys.c
+)
+set(sigma_source_files
+       sigma/sigma_cis.c
+       sigma/sigma_coc.c
+       sigma/sigma_cpu.c
+       sigma/sigma_dk.c
+       sigma/sigma_dp.c
+       sigma/sigma_fp.c
+       sigma/sigma_io.c
+       sigma/sigma_lp.c
+       sigma/sigma_map.c
+       sigma/sigma_mt.c
+       sigma/sigma_pt.c
+       sigma/sigma_rad.c
+       sigma/sigma_rtc.c
+       sigma/sigma_sys.c
+       sigma/sigma_tt.c
+)
+set(ssem_source_files
+       SSEM/ssem_cpu.c
+       SSEM/ssem_sys.c
+)
+set(swtp6800a_source_files
+       swtp6800/swtp6800/mp-a_sys.c
+       swtp6800/common/bootrom.c
+       swtp6800/common/dc-4.c
+       swtp6800/common/m6800.c
+       swtp6800/common/m6810.c
+       swtp6800/common/mp-8m.c
+       swtp6800/common/mp-a.c
+       swtp6800/common/mp-b2.c
+       swtp6800/common/mp-s.c
+)
+set(swtp6800a2_source_files
+       swtp6800/swtp6800/mp-a2_sys.c
+       swtp6800/common/bootrom.c
+       swtp6800/common/dc-4.c
+       swtp6800/common/i2716.c
+       swtp6800/common/m6800.c
+       swtp6800/common/m6810.c
+       swtp6800/common/mp-8m.c
+       swtp6800/common/mp-a2.c
+       swtp6800/common/mp-b2.c
+       swtp6800/common/mp-s.c
+)
+set(tx-0_source_files
+       TX-0/tx0_cpu.c
+       TX-0/tx0_dpy.c
+       TX-0/tx0_stddev.c
+       TX-0/tx0_sys.c
+       TX-0/tx0_sys_orig.c
+)
+set(vax_qbus_source_files
+       PDP11/pdp11_rl.c
+       PDP11/pdp11_rq.c
+       PDP11/pdp11_ts.c
+       PDP11/pdp11_dz.c
+       PDP11/pdp11_lp.c
+       PDP11/pdp11_tq.c
+       PDP11/pdp11_xq.c
+       PDP11/pdp11_vh.c
+       PDP11/pdp11_cr.c
+       PDP11/pdp11_td.c
+       PDP11/pdp11_io_lib.c
+)
+set(vax_unibus_source_files
+       PDP11/pdp11_rl.c
+       PDP11/pdp11_rq.c
+       PDP11/pdp11_ts.c
+       PDP11/pdp11_dz.c
+       PDP11/pdp11_lp.c
+       PDP11/pdp11_tq.c
+       PDP11/pdp11_xu.c
+       PDP11/pdp11_ry.c
+       PDP11/pdp11_cr.c
+       PDP11/pdp11_hk.c
+       PDP11/pdp11_vh.c
+       PDP11/pdp11_dmc.c
+       PDP11/pdp11_td.c
+       PDP11/pdp11_tc.c
+       PDP11/pdp11_rk.c
+       PDP11/pdp11_io_lib.c
+)
+set(vax_massbus_source_files
+       PDP11/pdp11_rp.c
+       PDP11/pdp11_tu.c
+       PDP11/pdp11_dup.c
+)
+set(vax_source_files
+       VAX/vax_2681.c
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_io.c
+       VAX/vax_lk.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_stddev.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax_sysdev.c
+       VAX/vax_syslist.c
+       VAX/vax_vc.c
+       VAX/vax_vs.c
+)
+set(vax730_source_files
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax730_mem.c
+       VAX/vax730_stddev.c
+       VAX/vax730_sys.c
+       VAX/vax730_syslist.c
+       VAX/vax730_uba.c
+       VAX/vax730_rb.c
+)
+set(vax750_source_files
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax750_cmi.c
+       VAX/vax750_mem.c
+       VAX/vax750_stddev.c
+       VAX/vax750_syslist.c
+       VAX/vax750_uba.c
+       VAX/vax7x0_mba.c
+)
+set(vax780_source_files
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax780_fload.c
+       VAX/vax780_mem.c
+       VAX/vax780_sbi.c
+       VAX/vax780_stddev.c
+       VAX/vax780_syslist.c
+       VAX/vax780_uba.c
+       VAX/vax7x0_mba.c
+)
+set(vax8600_source_files
+       VAX/vax_cis.c
+       VAX/vax_cmode.c
+       VAX/vax_cpu1.c
+       VAX/vax_cpu.c
+       VAX/vax_fpa.c
+       VAX/vax_mmu.c
+       VAX/vax_octa.c
+       VAX/vax_sys.c
+       VAX/vax_syscm.c
+       VAX/vax780_uba.c
+       VAX/vax7x0_mba.c
+       VAX/vax860_abus.c
+       VAX/vax860_sbia.c
+       VAX/vax860_stddev.c
+       VAX/vax860_syslist.c
+)
diff --git a/CMakeTestLargeFile.cmake b/CMakeTestLargeFile.cmake
new file mode 100644
index 0000000..d217cb9
--- /dev/null
+++ b/CMakeTestLargeFile.cmake
@@ -0,0 +1,32 @@
+#
+# Test if the toolchain supports large files
+#
+# VAR - Variable to set to 1 or 0, depending on the result
+#
+
+macro(test_large_file_support VAR)
+ set(FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTemp/test_large_file_support.c")
+       set(SOURCE "
+               # define _LARGEFILE64_SOURCE
+ # define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */
+               # define _LARGE_FILES        /* some OSes need this for 64-bit 
off_t */
+               #include <sys/types.h>
+
+               /* Check that off_t can represent 2**63 - 1 correctly.
+                  We can't simply define LARGE_OFF_T to be 9223372036854775807,
+                  since some C++ compilers masquerading as C compilers
+                  incorrectly reject 9223372036854775807.  */
+               #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+                 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                                      && LARGE_OFF_T % 2147483647 == 1)
+                                     ? 1 : -1];
+               int main () {return 0;}
+               ")
+       file(WRITE "${FILE}" "${SOURCE}\n")
+       try_compile(${VAR} ${CMAKE_BINARY_DIR} ${FILE})
+       if(${VAR})
+ message(STATUS "Checking whether toolchain has large file support -- yes")
+       else(${VAR})
+               message(STATUS "Checking whether toolchain has large file support -- 
no")
+       endif(${VAR})
+endmacro(test_large_file_support)
--
1.9.1

_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to