mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 19:30:50 +00:00
fixes for solaris
This commit is contained in:
parent
fd23d9ab21
commit
dce8bc8b02
@ -1,10 +1,36 @@
|
|||||||
set(CMAKE_C_COMPILER "clang")
|
|
||||||
set(CMAKE_CXX_COMPILER "clang++")
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -g")
|
|
||||||
set(CMAKE_C_FLAGS " -Wall -g")
|
|
||||||
|
|
||||||
project(mpw)
|
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
project(mpw)
|
||||||
|
set (PROJECT_TYPE "CXX")
|
||||||
|
set (PROJECT_NAME "mpw")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
set(CMAKE_C_COMPILER "clang")
|
||||||
|
set(CMAKE_CXX_COMPILER "clang++")
|
||||||
|
set(CMAKE_CXX_FLAGS "-stdlib=libc++ -Wall -g")
|
||||||
|
set(CMAKE_C_FLAGS " -Wall -g")
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
|
||||||
|
set(CMAKE_C_COMPILER "gcc")
|
||||||
|
set(CMAKE_CXX_COMPILER "g++")
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -g")
|
||||||
|
set(CMAKE_C_FLAGS "-std=c99 -Wall -g")
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||||
|
set(CMAKE_C_COMPILER "gcc")
|
||||||
|
set(CMAKE_CXX_COMPILER "g++")
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -g")
|
||||||
|
set(CMAKE_C_FLAGS "-std=c99 -Wall -g")
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#set_property (TARGET mpw PROPERTY CXX_STANDARD 14)
|
||||||
|
#set_property (TARGET mpw PROPERTY CXX_STANDARD_REQUIRED TRUE)
|
||||||
|
#set_property (TARGET mpw PROPERTY CXX_EXTENSIONS FALSE)
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(bin)
|
add_subdirectory(bin)
|
||||||
add_subdirectory(cpu)
|
add_subdirectory(cpu)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
#set(CMAKE_C_COMPILER "clang")
|
|
||||||
#set(CMAKE_CXX_COMPILER "clang++")
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -Wno-deprecated-declarations -g")
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "-framework Carbon")
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
||||||
@ -84,9 +80,9 @@ target_link_libraries(mpw MACOS_LIB)
|
|||||||
set_target_properties(mpw PROPERTIES LINK_FLAGS "-ledit")
|
set_target_properties(mpw PROPERTIES LINK_FLAGS "-ledit")
|
||||||
|
|
||||||
|
|
||||||
add_executable(disasm disasm.cpp)
|
#add_executable(disasm disasm.cpp)
|
||||||
target_link_libraries(disasm CPU_LIB)
|
#target_link_libraries(disasm CPU_LIB)
|
||||||
target_link_libraries(disasm MACOS_LIB)
|
#target_link_libraries(disasm MACOS_LIB)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS
|
PROGRAMS
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS " -Wall -Wno-unused-function -g")
|
set(CMAKE_C_FLAGS "-std=c99 -Wall -Wno-unused-function -g")
|
||||||
|
|
||||||
set(CPU_SRC
|
set(CPU_SRC
|
||||||
CpuModule.c
|
CpuModule.c
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -g")
|
|
||||||
|
|
||||||
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
||||||
|
|
||||||
set(MACOS_SRC traps.c sysequ.c errors.cpp)
|
set(MACOS_SRC traps.c sysequ.c errors.cpp)
|
||||||
|
|
||||||
|
|
||||||
add_library(MACOS_LIB ${MACOS_SRC})
|
add_library(MACOS_LIB ${MACOS_SRC})
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -g")
|
|
||||||
|
|
||||||
set(NATIVE_SRC native.cpp ${CMAKE_SYSTEM_NAME}.cpp)
|
set(NATIVE_SRC native.cpp ${CMAKE_SYSTEM_NAME}.cpp)
|
||||||
|
|
||||||
add_library(NATIVE_LIB ${NATIVE_SRC})
|
add_library(NATIVE_LIB ${NATIVE_SRC})
|
||||||
|
@ -79,7 +79,7 @@ namespace native {
|
|||||||
if (x == 32 || x == 16){
|
if (x == 32 || x == 16){
|
||||||
prodos_ftype_out(buffer);
|
prodos_ftype_out(buffer);
|
||||||
memcpy(info, buffer, extended ? 32 : 16);
|
memcpy(info, buffer, extended ? 32 : 16);
|
||||||
return 0;
|
return noErr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,10 +26,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "native_internal.h"
|
#include "native_internal.h"
|
||||||
|
#include <string>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
using namespace MacOS;
|
using namespace MacOS;
|
||||||
|
|
||||||
@ -342,4 +345,4 @@ namespace native {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++14 -stdlib=libc++ -Wall -Wno-deprecated-declarations -g")
|
|
||||||
|
|
||||||
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
|
||||||
|
|
||||||
set(TOOLBOX_SRC
|
set(TOOLBOX_SRC
|
||||||
@ -53,4 +51,4 @@ set_source_files_properties(
|
|||||||
"${CMAKE_CXX_FLAGS} -Wno-unused-variable"
|
"${CMAKE_CXX_FLAGS} -Wno-unused-variable"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(TOOLBOX_LIB ${TOOLBOX_SRC})
|
add_library(TOOLBOX_LIB ${TOOLBOX_SRC})
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
#include "toolbox.h"
|
#include "toolbox.h"
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
|
|
||||||
#include "RM.h"
|
#include "rm.h"
|
||||||
#include "MM.h"
|
#include "mm.h"
|
||||||
|
|
||||||
#include <macos/sysequ.h>
|
#include <macos/sysequ.h>
|
||||||
|
|
||||||
|
@ -32,9 +32,7 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -32,9 +32,7 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -32,9 +32,7 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -381,7 +379,9 @@ namespace OS {
|
|||||||
if (!strcmp(dir->d_name, ".")) continue;
|
if (!strcmp(dir->d_name, ".")) continue;
|
||||||
if (!strcmp(dir->d_name, "..")) continue;
|
if (!strcmp(dir->d_name, "..")) continue;
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_DIRENT_D_NAMLEN
|
||||||
if (dir->d_namlen > 255) continue; // too long!
|
if (dir->d_namlen > 255) continue; // too long!
|
||||||
|
#endif
|
||||||
if (--ioFDirIndex == 0) break;
|
if (--ioFDirIndex == 0) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -38,13 +38,11 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/attr.h>
|
#include <sys/attr.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
|
|
||||||
#include <native/native.h>
|
#include <native/native.h>
|
||||||
|
|
||||||
#include <machine/endian.h>
|
//#include <machine/endian.h>
|
||||||
|
|
||||||
using ToolBox::Log;
|
using ToolBox::Log;
|
||||||
using MacOS::macos_error_from_errno;
|
using MacOS::macos_error_from_errno;
|
||||||
|
@ -32,9 +32,7 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <sys/xattr.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/paths.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user