diff --git a/SConstruct b/SConstruct index 1d9048e876..ea00bc1ffd 100644 --- a/SConstruct +++ b/SConstruct @@ -1,7 +1,11 @@ import os +import sys ccflags = '-g -O3 -fno-strict-aliasing -fPIC -msse2 -Wall -DLOGGING -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' +if sys.platform == 'darwin': + ccflags += ' -I/opt/local/include' + if False: ccflags += ' -fomit-frame-pointer' @@ -16,7 +20,22 @@ include_paths = ["../../../Core/Common/Src", # "../../../Plugins/Plugin_VideoOGL/Src/Windows", ] -dirs = ["Source/Core/Common/Src", +if sys.platform == 'darwin': + dirs = ["Source/Core/Common/Src", + "Externals/Bochs_disasm", + "Source/Core/Core/Src", + "Source/Core/DiscIO/Src", + "Source/Core/DebuggerWX/src", + "Source/Core/VideoCommon/Src", +# "Source/Plugins/Plugin_VideoOGL/Src", + "Source/Plugins/Plugin_DSP_NULL/Src", +# "Source/Plugins/Plugin_DSP_LLE/Src", +# "Source/Plugins/Plugin_PadSimple/Src", + "Source/Plugins/Plugin_nJoy_SDL/Src", + "Source/Core/DolphinWX/src", + ] +else: + dirs = ["Source/Core/Common/Src", "Externals/Bochs_disasm", "Source/Core/Core/Src", "Source/Core/DiscIO/Src", @@ -30,6 +49,7 @@ dirs = ["Source/Core/Common/Src", "Source/Core/DolphinWX/src", ] + lib_paths = include_paths env = Environment(CC="gcc", diff --git a/Source/Core/Common/Src/MappedFile.cpp b/Source/Core/Common/Src/MappedFile.cpp index 4599935ff1..5788fca6a7 100644 --- a/Source/Core/Common/Src/MappedFile.cpp +++ b/Source/Core/Common/Src/MappedFile.cpp @@ -17,7 +17,7 @@ #ifdef _WIN32 #include -#elif __linux__ +#else #include #include #include diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp index 4694f3ca13..5b6ff6f11b 100644 --- a/Source/Core/Common/Src/MemoryUtil.cpp +++ b/Source/Core/Common/Src/MemoryUtil.cpp @@ -26,6 +26,10 @@ #include #endif +#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) +#define MAP_ANONYMOUS MAP_ANON +#endif + // MacOSX does not support MAP_VARIABLE #ifndef MAP_VARIABLE #define MAP_VARIABLE 0 diff --git a/Source/Core/DolphinWX/src/SConscript b/Source/Core/DolphinWX/src/SConscript index 0589eee1c7..63f008c621 100644 --- a/Source/Core/DolphinWX/src/SConscript +++ b/Source/Core/DolphinWX/src/SConscript @@ -1,4 +1,5 @@ Import('env') +import sys files = ["BootManager.cpp", "Config.cpp", @@ -13,7 +14,12 @@ files = ["BootManager.cpp", "PluginOptions.cpp", "stdafx.cpp", ] + + wxenv = env.Copy(CXXFLAGS = "`wx-config --cppflags` -DUSE_XPM_BITMAPS -DwxNEEDS_CHARPP", LINKFLAGS = "-L/usr/local/lib -pthread `wx-config --libs`") - -wxenv.Program("../../../../Binary/linux/Dolphin", files, LIBS = ["debwx", "discio", "core", "bdisasm", "videocommon", "common"]) + +if sys.platform == 'darwin': + wxenv.Program("../../../../Binary/mac/Dolphin.app/Contents/MacOS/Dolphin", files, LIBS = ["debwx", "discio", "core", "bdisasm", "videocommon", "common" , "z"]) +else: + wxenv.Program("../../../../Binary/linux/Dolphin", files, LIBS = ["debwx", "discio", "core", "bdisasm", "videocommon", "common"])