mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
adding lots of features to SConstruct, scons -h to see, known bug: verbose=False is treated as true no idea why...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@581 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
78bb1cf82d
commit
f63a845d9f
@ -3,3 +3,20 @@ GFXPlugin = Plugins/libzeroogl.so
|
||||
DSPPlugin = Plugins/libdsphle.so
|
||||
PadPlugin = Plugins/libPlugin_nJoy_SDL.so
|
||||
WiiMotePlugin = Plugins/libPlugin_Wiimote.so
|
||||
[General]
|
||||
LastFilename =
|
||||
GCMPathes = 2
|
||||
GCMPath0 = /storage2
|
||||
GCMPath1 = /storage2/vm
|
||||
[Core]
|
||||
GFXPlugin = Plugins/libzeroogl.so
|
||||
DSPPlugin = Plugins/libdsphle.so
|
||||
PadPlugin = Plugins/libpadsimple.so
|
||||
WiiMotePlugin = Plugins/libPlugin_Wiimote.so
|
||||
HLEBios = True
|
||||
UseDynarec = True
|
||||
UseDualCore = False
|
||||
SkipIdle = False
|
||||
LockThreads = True
|
||||
DefaultGCM = /storage2/vm/Zelda-The wind waker.iso
|
||||
OptimizeQuantizers = True
|
||||
|
80
SConstruct
80
SConstruct
@ -1,32 +1,36 @@
|
||||
# -*- python -*-
|
||||
import os
|
||||
import sys
|
||||
|
||||
# TODO: What is the current Dolphin version?
|
||||
dolphin_version = '1.04'
|
||||
Export('dolphin_version')
|
||||
# TODO: how do we use it in help?
|
||||
name="Dolphin"
|
||||
version="SVN"
|
||||
description="A wii/gamecube emulator"
|
||||
license="GPL v2"
|
||||
|
||||
warnings = [
|
||||
'all',
|
||||
'write-strings',
|
||||
#'float-equal',
|
||||
'shadow',
|
||||
'pointer-arith',
|
||||
'packed',
|
||||
'no-conversion',
|
||||
# 'error',
|
||||
#'unreachable-code',
|
||||
]
|
||||
compileFlags = [
|
||||
'-fno-exceptions',
|
||||
'-fno-strict-aliasing',
|
||||
'-msse2',
|
||||
'-D_FILE_OFFSET_BITS=64',
|
||||
'-D_LARGEFILE_SOURCE',
|
||||
'-DGCC_HASCLASSVISIBILITY',
|
||||
'-fvisibility=hidden',
|
||||
# '-fomit-frame-pointer'
|
||||
]
|
||||
|
||||
#compileFlags += [ '-fomit-frame-pointer' ]
|
||||
cppDefines = [
|
||||
( '_FILE_OFFSET_BITS', 64),
|
||||
'_LARGEFILE_SOURCE',
|
||||
'GCC_HASCLASSVISIBILITY',
|
||||
]
|
||||
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
compileFlags += [ '-I/opt/local/include' ]
|
||||
|
||||
@ -72,16 +76,34 @@ if sys.platform == 'darwin':
|
||||
|
||||
lib_paths = include_paths
|
||||
|
||||
debug = ARGUMENTS.get('debug', 0)
|
||||
if int(debug):
|
||||
# handle command line options
|
||||
vars = Variables('custom.py')
|
||||
vars.AddVariables(
|
||||
BoolVariable('verbose', 'Set for compilation line', False),
|
||||
BoolVariable('debug', 'Set for debug build', False),
|
||||
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
||||
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
||||
allowed_values=('release', 'devel', 'debug'),
|
||||
ignorecase=2)
|
||||
|
||||
)
|
||||
|
||||
# build falvuor
|
||||
flavour = ARGUMENTS.get('flavor')
|
||||
if (flavour == 'debug'):
|
||||
compileFlags.append('-g')
|
||||
compileFlags.append('-DLOGGING')
|
||||
cppDefines.append('LOGGING')
|
||||
else:
|
||||
compileFlags.append('-O3')
|
||||
|
||||
lint = ARGUMENTS.get('lint', 0)
|
||||
if int(lint):
|
||||
|
||||
# more warnings
|
||||
lint = ARGUMENTS.get('lint', False)
|
||||
if bool(lint):
|
||||
warnings.append('error')
|
||||
warnings.append('unreachable-code')
|
||||
warnings.append('float-equal')
|
||||
|
||||
|
||||
compileFlags += [ '-W' + warning for warning in warnings ]
|
||||
|
||||
@ -90,17 +112,45 @@ env = Environment(
|
||||
CXX = 'g++',
|
||||
CCFLAGS = ' '.join(compileFlags),
|
||||
CXXFLAGS = ' '.join(compileFlags + [ '-fvisibility-inlines-hidden' ]),
|
||||
CPPDEFINES = cppDefines,
|
||||
CPPPATH = include_paths,
|
||||
LIBPATH = lib_paths,
|
||||
variables = vars,
|
||||
ENV = {
|
||||
'PATH' : os.environ['PATH'],
|
||||
'HOME' : os.environ['HOME']
|
||||
},
|
||||
BUILDERS = builders,
|
||||
DESCRIPTION = description,
|
||||
SUMMARY=description,
|
||||
LICENSE = license,
|
||||
NAME = name,
|
||||
VERSION = version,
|
||||
)
|
||||
|
||||
# verbose compile
|
||||
verbose = ARGUMENTS.get('verbose', False)
|
||||
|
||||
if not verbose:
|
||||
env['CCCOMSTR'] = "Compiling $TARGET"
|
||||
env['CXXCOMSTR'] = "Compiling $TARGET"
|
||||
env['ARCOMSTR'] = " ar $TARGER"
|
||||
env['LINKCOMSTR'] = "Linking $TARGET"
|
||||
|
||||
|
||||
Export('env')
|
||||
|
||||
Progress(['-\r', '\\\r', '|\r', '/\r'], interval=5)
|
||||
|
||||
# die on unknown variables
|
||||
unknown = vars.UnknownVariables()
|
||||
if unknown:
|
||||
print "Unknown variables:", unknown.keys()
|
||||
Exit(1)
|
||||
|
||||
#generate help
|
||||
Help(vars.GenerateHelpText(env))
|
||||
|
||||
for subdir in dirs:
|
||||
SConscript(
|
||||
subdir + os.sep + 'SConscript',
|
||||
|
Loading…
Reference in New Issue
Block a user