2008-07-12 19:40:22 +02:00
|
|
|
import os
|
2008-07-30 11:12:52 +02:00
|
|
|
import sys
|
2008-07-12 19:40:22 +02:00
|
|
|
|
2008-08-13 01:17:29 +02:00
|
|
|
# TODO: What is the current Dolphin version?
|
|
|
|
dolphin_version = '1.04'
|
|
|
|
Export('dolphin_version')
|
|
|
|
|
2008-08-03 11:21:04 +02:00
|
|
|
warnings = ' -Wall -Wwrite-strings -Wfloat-equal -Wshadow -Wpointer-arith -Wpacked -Wno-conversion'
|
2008-07-31 22:25:30 +02:00
|
|
|
|
|
|
|
nonactive_warnings = '-Wunreachable-code'
|
|
|
|
|
2008-08-01 10:37:19 +02:00
|
|
|
ccflags = '-g -O3 -fno-strict-aliasing -fPIC -msse2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' + warnings
|
|
|
|
#ccflags += ' -DLOGGING'
|
2008-07-12 19:40:22 +02:00
|
|
|
|
2008-07-30 11:12:52 +02:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
ccflags += ' -I/opt/local/include'
|
|
|
|
|
2008-07-12 19:40:22 +02:00
|
|
|
if False:
|
|
|
|
ccflags += ' -fomit-frame-pointer'
|
|
|
|
|
|
|
|
include_paths = ["../../../Core/Common/Src",
|
|
|
|
"../../../Core/DiscIO/Src",
|
|
|
|
"../../../PluginSpecs",
|
|
|
|
"../../../",
|
|
|
|
"../../../Core/Core/Src",
|
|
|
|
"../../../Core/DebuggerWX/src",
|
|
|
|
"../../../../Externals/Bochs_disasm",
|
2008-07-20 13:02:41 +02:00
|
|
|
"../../../Core/VideoCommon/Src",
|
2008-07-12 19:40:22 +02:00
|
|
|
# "../../../Plugins/Plugin_VideoOGL/Src/Windows",
|
|
|
|
]
|
|
|
|
|
2008-08-13 01:17:29 +02:00
|
|
|
builders = {}
|
2008-07-30 11:12:52 +02:00
|
|
|
if sys.platform == 'darwin':
|
2008-08-13 01:17:29 +02:00
|
|
|
from plistlib import writePlist
|
|
|
|
def create_plist(target, source, env):
|
|
|
|
properties = {}
|
|
|
|
for src_node in source:
|
|
|
|
properties.update(src_node.value)
|
|
|
|
for dst_node in target:
|
|
|
|
writePlist(properties, str(dst_node))
|
|
|
|
builders['Plist'] = Builder(action = create_plist)
|
|
|
|
|
2008-07-30 11:12:52 +02:00
|
|
|
dirs = ["Source/Core/Common/Src",
|
|
|
|
"Externals/Bochs_disasm",
|
|
|
|
"Source/Core/Core/Src",
|
|
|
|
"Source/Core/DiscIO/Src",
|
2008-07-31 22:25:30 +02:00
|
|
|
"Source/Core/DebuggerWX/src",
|
|
|
|
"Source/Core/VideoCommon/Src",
|
2008-08-06 23:07:31 +02:00
|
|
|
"Source/Plugins/Plugin_VideoOGL/Src",
|
2008-07-31 22:25:30 +02:00
|
|
|
"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",
|
|
|
|
]
|
2008-07-30 11:12:52 +02:00
|
|
|
else:
|
|
|
|
dirs = ["Source/Core/Common/Src",
|
2008-07-12 19:40:22 +02:00
|
|
|
"Externals/Bochs_disasm",
|
|
|
|
"Source/Core/Core/Src",
|
|
|
|
"Source/Core/DiscIO/Src",
|
|
|
|
"Source/Core/DebuggerWX/src",
|
2008-07-20 13:02:41 +02:00
|
|
|
"Source/Core/VideoCommon/Src",
|
2008-07-12 19:40:22 +02:00
|
|
|
"Source/Plugins/Plugin_VideoOGL/Src",
|
2008-07-20 13:02:41 +02:00
|
|
|
"Source/Plugins/Plugin_DSP_NULL/Src",
|
2008-08-01 10:37:19 +02:00
|
|
|
# "Source/Plugins/Plugin_DSP_LLE/Src",
|
2008-07-12 19:40:22 +02:00
|
|
|
"Source/Plugins/Plugin_PadSimple/Src",
|
2008-07-23 20:53:54 +02:00
|
|
|
"Source/Plugins/Plugin_nJoy_SDL/Src",
|
2008-07-12 19:40:22 +02:00
|
|
|
"Source/Core/DolphinWX/src",
|
|
|
|
]
|
|
|
|
|
2008-07-30 11:12:52 +02:00
|
|
|
|
2008-07-12 19:40:22 +02:00
|
|
|
lib_paths = include_paths
|
|
|
|
|
2008-07-23 10:49:58 +02:00
|
|
|
env = Environment(CC="gcc",
|
|
|
|
CXX="g++",
|
2008-07-12 19:40:22 +02:00
|
|
|
CCFLAGS=ccflags,
|
|
|
|
CXXFLAGS=ccflags,
|
|
|
|
CPPPATH=include_paths,
|
|
|
|
LIBPATH=lib_paths,
|
|
|
|
ENV={'PATH' : os.environ['PATH'],
|
2008-08-13 01:17:29 +02:00
|
|
|
'HOME' : os.environ['HOME']},
|
|
|
|
BUILDERS = builders,
|
|
|
|
)
|
2008-07-12 19:40:22 +02:00
|
|
|
|
|
|
|
Export('env')
|
|
|
|
|
|
|
|
builddir = "build"
|
|
|
|
|
|
|
|
for dir in dirs:
|
|
|
|
SConscript(
|
|
|
|
dir + os.sep + "SConscript",
|
|
|
|
# build_dir = builddir + os.sep + dir,
|
|
|
|
duplicate = 0
|
|
|
|
)
|
|
|
|
|