diff --git a/Externals/GLew/CMakeLists.txt b/Externals/GLew/CMakeLists.txt index 1ff0800529..408509edc0 100644 --- a/Externals/GLew/CMakeLists.txt +++ b/Externals/GLew/CMakeLists.txt @@ -1,7 +1,5 @@ include_directories(include) -set(SRCS src/glew.c - src/glewinfo.c - src/visualinfo.c) +set(SRCS src/glew.c) add_library(GLEW STATIC ${SRCS}) diff --git a/Externals/GLew/SConscript b/Externals/GLew/SConscript index d4e5b00ea8..872cefa7e4 100644 --- a/Externals/GLew/SConscript +++ b/Externals/GLew/SConscript @@ -1,15 +1,19 @@ # -*- python -*- Import('env') +import sys if env.has_key('shared_glew') and env['shared_glew']: Return() -files = [ - 'src/glew.c', - 'src/glewinfo.c', - 'src/visualinfo.c', - ] +if sys.platform == 'darwin': + libs = ['GLEW'] + frames = ['AGL', 'OpenGL'] +else: + libs = ['GLEW', 'GL', 'GLU'] + frames = [] -env.StaticLibrary(env['local_libs'] + "GLEW", files) +env.Program('glewinfo', 'src/glewinfo.c', LIBS = libs, FRAMEWORKS = frames) +env.Program('visualinfo', 'src/visualinfo.c', LIBS = libs, FRAMEWORKS = frames) +env.StaticLibrary(env['local_libs'] + 'GLEW', ['src/glew.c']) env['CPPPATH'] += ['#Externals/GLew/include'] diff --git a/Source/Core/DSPCore/Src/DSPCore.cpp b/Source/Core/DSPCore/Src/DSPCore.cpp index f65996ac46..b053395881 100644 --- a/Source/Core/DSPCore/Src/DSPCore.cpp +++ b/Source/Core/DSPCore/Src/DSPCore.cpp @@ -39,7 +39,7 @@ SDSP g_dsp; DSPBreakpoints dsp_breakpoints; DSPCoreState core_state = DSPCORE_STOP; u16 cyclesLeft = 0; -DSPEmitter *jit = NULL; +DSPEmitter *dspjit = NULL; Common::Event step_event; Common::CriticalSection ExtIntCriticalSection; @@ -92,7 +92,7 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename, { g_dsp.step_counter = 0; cyclesLeft = 0; - jit = NULL; + dspjit = NULL; g_dsp.irom = (u16*)AllocateMemoryPages(DSP_IROM_BYTE_SIZE); g_dsp.iram = (u16*)AllocateMemoryPages(DSP_IRAM_BYTE_SIZE); @@ -150,7 +150,7 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename, // Initialize JIT, if necessary if(bUsingJIT) - jit = new DSPEmitter(); + dspjit = new DSPEmitter(); DSPAnalyzer::Analyze(); @@ -165,9 +165,9 @@ void DSPCore_Shutdown() { core_state = DSPCORE_STOP; - if(jit) { - delete jit; - jit = NULL; + if(dspjit) { + delete dspjit; + dspjit = NULL; } step_event.Shutdown(); FreeMemoryPages(g_dsp.irom, DSP_IROM_BYTE_SIZE); @@ -248,10 +248,10 @@ void DSPCore_CheckExceptions() // Handle state changes and stepping. int DSPCore_RunCycles(int cycles) { - if (jit) + if (dspjit) { cyclesLeft = cycles; - CompiledCode pExecAddr = (CompiledCode)jit->enterDispatcher; + CompiledCode pExecAddr = (CompiledCode)dspjit->enterDispatcher; pExecAddr(); if (g_dsp.external_interrupt_waiting) @@ -318,7 +318,7 @@ void DSPCore_Step() void CompileCurrent() { - jit->Compile(g_dsp.pc); + dspjit->Compile(g_dsp.pc); bool retry = true; @@ -327,11 +327,11 @@ void CompileCurrent() retry = false; for(u16 i = 0x0000; i < 0xffff; ++i) { - if (!jit->unresolvedJumps[i].empty()) + if (!dspjit->unresolvedJumps[i].empty()) { - u16 addrToCompile = jit->unresolvedJumps[i].front(); - jit->Compile(addrToCompile); - if (!jit->unresolvedJumps[i].empty()) + u16 addrToCompile = dspjit->unresolvedJumps[i].front(); + dspjit->Compile(addrToCompile); + if (!dspjit->unresolvedJumps[i].empty()) retry = true; } } diff --git a/Source/Core/DSPCore/Src/DSPCore.h b/Source/Core/DSPCore/Src/DSPCore.h index 9204237d35..2f69eb6ee6 100644 --- a/Source/Core/DSPCore/Src/DSPCore.h +++ b/Source/Core/DSPCore/Src/DSPCore.h @@ -267,7 +267,7 @@ struct SDSP extern SDSP g_dsp; extern DSPBreakpoints dsp_breakpoints; -extern DSPEmitter *jit; +extern DSPEmitter *dspjit; extern u16 cyclesLeft; bool DSPCore_Init(const char *irom_filename, const char *coef_filename, diff --git a/Source/Core/DSPCore/Src/DSPHWInterface.cpp b/Source/Core/DSPCore/Src/DSPHWInterface.cpp index aea0aa70fd..a2862affe3 100644 --- a/Source/Core/DSPCore/Src/DSPHWInterface.cpp +++ b/Source/Core/DSPCore/Src/DSPHWInterface.cpp @@ -257,8 +257,8 @@ void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size) NOTICE_LOG(DSPLLE, "*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)", addr, dsp_addr, g_dsp.iram_crc); - if (jit) - jit->ClearIRAM(); + if (dspjit) + dspjit->ClearIRAM(); DSPAnalyzer::Analyze(); } diff --git a/Source/DSPTool/Src/SConscript b/Source/DSPTool/Src/SConscript index f006b20f98..3a67de6460 100644 --- a/Source/DSPTool/Src/SConscript +++ b/Source/DSPTool/Src/SConscript @@ -1,6 +1,7 @@ # -*- python -*- Import('env') +import sys files = [ 'main.cpp', @@ -11,4 +12,9 @@ libs = [ 'common', ] -env.Program('dsptool', files, LIBS = libs) +if sys.platform == 'darwin': + frames = ['CoreFoundation'] +else: + frames = [] + +env.Program('dsptool', files, LIBS = libs, FRAMEWORKS = frames) diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index fe218070bd..1f11eb484c 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -217,7 +217,7 @@ void dsp_thread() { int cycles = (int)cycle_count; if (cycles > 0) { - if (jit) + if (dspjit) DSPCore_RunCycles(cycles); else DSPInterpreter::RunCycles(cycles); diff --git a/Source/UnitTests/SConscript b/Source/UnitTests/SConscript index 9df9bb0087..d6b1e28ca8 100644 --- a/Source/UnitTests/SConscript +++ b/Source/UnitTests/SConscript @@ -1,6 +1,7 @@ # -*- python -*- Import('env') +import sys files = [ "AudioJitTests.cpp", @@ -12,4 +13,9 @@ libs = [ 'dspcore', 'common', ] -env.Program('tester', files, LIBS = libs) +if sys.platform == 'darwin': + frames = ['CoreFoundation'] +else: + frames = [] + +env.Program('tester', files, LIBS = libs, FRAMEWORKS = frames)