Simplify the SCons build:

On OS X, build all code as Objective-C(++).

Centralize framework handling.

Cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5645 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-06-10 14:18:21 +00:00
parent de45e015cd
commit 404c625622
26 changed files with 110 additions and 253 deletions

View File

@ -20,36 +20,8 @@ if wxenv['HAVE_WX']:
'Source/Core/DolphinWX/Src/WxUtils.cpp',
]
if wxenv['HAVE_COCOA']:
files += [ 'cocoaApp.m', ]
compileFlags = [
'-x',
'objective-c++',
]
wxenv.Append(
CXXFLAGS = compileFlags,
LINKFLAGS = [
'-pthread',
],
LIBS = libs
)
if not wxenv['HAVE_WX']:
wxenv.Append(
LINKFLAGS = ['-framework', 'IOKit'])
else:
wxenv.Append(
LINKFLAGS = [
'-pthread',
],
LIBS = libs
)
LIBS = libs
exeGUI = env['binary_dir'] + 'MemcardManager'
#objects = [ wxenv.Object(srcFile) for srcFile in files ]
wxenv.Program(exeGUI, files)

View File

@ -9,15 +9,9 @@ sys.path.append('SconsTests')
import wxconfig
import utils
# Some features needs at least scons 0.98
# Some features need at least SCons 1.2
EnsureSConsVersion(1, 2)
# TODO: how do we use it in help?
name="Memory Card Manager"
version="1.0"
description=""
license="GPL v2"
warnings = [
'all',
'write-strings',
@ -47,11 +41,11 @@ include_paths = [
basedir + 'Source/Core/Common/Src',
basedir + 'Source/PluginSpecs',
basedir + 'Source/Core/DolphinWX/Src',
basedir + 'Externals/MemcardManager/src',
basedir + 'Externals/MemcardManager/src',
]
dirs = [
basedir + 'Source/Core/Common/Src',
basedir + 'Source/Core/Common/Src',
basedir + '.',
]
@ -91,11 +85,6 @@ if sys.platform == 'win32':
variables = vars,
ENV = os.environ,
BUILDERS = builders,
DESCRIPTION = description,
SUMMARY = description,
LICENSE = license,
NAME = name,
VERSION = version,
)
else:
env = Environment(
@ -109,11 +98,6 @@ else:
'HOME' : os.environ['HOME']
},
BUILDERS = builders,
DESCRIPTION = description,
SUMMARY = description,
LICENSE = license,
NAME = name,
VERSION = version,
)
# save the given command line options
@ -132,7 +116,7 @@ if not env['verbose']:
env['SHLINKCOMSTR'] = "Linking shared $TARGET"
env['RANLIBCOMSTR'] = "Indexing $TARGET"
# build falvuor
# build flavour
flavour = ARGUMENTS.get('flavor')
if (flavour == 'debug'):
compileFlags.append('-g')
@ -189,7 +173,6 @@ if not conf.CheckPKGConfig('0.15.0'):
env['HAVE_X11'] = conf.CheckPKG('x11')
env['HAVE_COCOA'] = 0
# handling wx flags CCFLAGS should be created before
wxmods = ['adv', 'core', 'base']
@ -201,7 +184,6 @@ env['HAVE_WX'] = conf.CheckWXConfig('2.8', wxmods, 0)
conf.Define('HAVE_WX', env['HAVE_WX'])
conf.Define('USE_WX', env['USE_WX'])
conf.Define('HAVE_X11', env['HAVE_X11'])
conf.Define('HAVE_COCOA', env['HAVE_COCOA'])
# profile

View File

@ -1170,10 +1170,10 @@ static int process_scan_header(jpeg *z)
if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s.img_n) return e("bad SOS component count","Corrupt JPEG");
if (Ls != 6+2*z->scan_n) return e("bad SOS len","Corrupt JPEG");
for (i=0; i < z->scan_n; ++i) {
int id = get8(&z->s), which;
int ID = get8(&z->s), which;
int q = get8(&z->s);
for (which = 0; which < z->s.img_n; ++which)
if (z->img_comp[which].id == id)
if (z->img_comp[which].id == ID)
break;
if (which == z->s.img_n) return 0;
z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return e("bad DC huff","Corrupt JPEG");