mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 01:17:40 +00:00
Support more configuration flags in scons.
This commit is contained in:
parent
f2bc4bbdcb
commit
d71d7fa45b
20
SConstruct
20
SConstruct
@ -24,7 +24,7 @@ opts.Add(PathOption('prefsdir', 'user preferences directory', ".wesnoth", PathOp
|
|||||||
opts.Add(BoolOption('debug', 'Set to build for debugging', False))
|
opts.Add(BoolOption('debug', 'Set to build for debugging', False))
|
||||||
opts.Add(BoolOption('profile', 'Set to build for debugging', False))
|
opts.Add(BoolOption('profile', 'Set to build for debugging', False))
|
||||||
opts.Add(BoolOption('strict', 'Set to strict compilation', False))
|
opts.Add(BoolOption('strict', 'Set to strict compilation', False))
|
||||||
opts.Add(BoolOption('tests', 'Set to enable static building of Wesnoth', False))
|
opts.Add(BoolOption('static', 'Set to enable static building of Wesnoth', False))
|
||||||
opts.Add(BoolOption('lite', 'Set to build lite version of wesnoth (no music or large images)', False))
|
opts.Add(BoolOption('lite', 'Set to build lite version of wesnoth (no music or large images)', False))
|
||||||
opts.Add(BoolOption('smallgui', 'Set for GUI reductions for resolutions down to 800x480 (eeePC, Nokia 8x0), resize images before installing', False))
|
opts.Add(BoolOption('smallgui', 'Set for GUI reductions for resolutions down to 800x480 (eeePC, Nokia 8x0), resize images before installing', False))
|
||||||
opts.Add(BoolOption('tinygui', 'Set for GUI reductions for resolutions down to 320x240 (PDAs), resize images before installing', False))
|
opts.Add(BoolOption('tinygui', 'Set for GUI reductions for resolutions down to 320x240 (PDAs), resize images before installing', False))
|
||||||
@ -83,12 +83,14 @@ if not "/" in envdict["datadir"]:
|
|||||||
|
|
||||||
cc_version = env["CCVERSION"]
|
cc_version = env["CCVERSION"]
|
||||||
|
|
||||||
debug = ARGUMENTS.get('debug', 'no')
|
if env["debug"] == "yes":
|
||||||
if debug == "yes":
|
|
||||||
env["CXXFLAGS"] = Split("-O0 -DDEBUG -ggdb3 -W -Wall -ansi")
|
env["CXXFLAGS"] = Split("-O0 -DDEBUG -ggdb3 -W -Wall -ansi")
|
||||||
else:
|
else:
|
||||||
env["CXXFLAGS"] = Split("-O2 -ansi")
|
env["CXXFLAGS"] = Split("-O2 -ansi")
|
||||||
|
|
||||||
|
if env['static']:
|
||||||
|
env["LDFLAGS"].append("-all-static")
|
||||||
|
|
||||||
if env['profile']:
|
if env['profile']:
|
||||||
env["CXXFLAGS"].append("-pg")
|
env["CXXFLAGS"].append("-pg")
|
||||||
|
|
||||||
@ -223,18 +225,6 @@ wesconfig_builder = Builder(action = wesconfig_build)
|
|||||||
env.Append(BUILDERS = {'Wesconfig' : wesconfig_builder})
|
env.Append(BUILDERS = {'Wesconfig' : wesconfig_builder})
|
||||||
env.Wesconfig("src/wesconfig.h", "SConstruct")
|
env.Wesconfig("src/wesconfig.h", "SConstruct")
|
||||||
|
|
||||||
# Build tests to crib from:
|
|
||||||
# http://silvertree.googlecode.com/svn/trunk/{SConstruct,scons/}
|
|
||||||
#
|
|
||||||
# Tips on MacOS scons usage
|
|
||||||
# http://www.scons.org/wiki/MacOSX
|
|
||||||
#
|
|
||||||
# Scons missing features:
|
|
||||||
# 1. [] overloading should be used more -- in particular, environment and
|
|
||||||
# options dictionaries should be directly accessible through it.
|
|
||||||
# 2. Where's the command-existence test?
|
|
||||||
# 3. New builder: Make target from string in SConstruct itself.
|
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: python
|
# mode: python
|
||||||
# end:
|
# end:
|
||||||
|
@ -10,8 +10,8 @@ env.Default("all")
|
|||||||
# Libraries and source groups
|
# Libraries and source groups
|
||||||
#
|
#
|
||||||
boost_libs = Split("boost_iostreams-mt boost_regex")
|
boost_libs = Split("boost_iostreams-mt boost_regex")
|
||||||
SDL_libs = Split("SDL_net SDL_ttf SDL_mixer SDL pthread SDL_image")
|
SDL_libs = Split("SDL_net SDL_ttf SDL_mixer SDL_image SDL")
|
||||||
commonlibs = SDL_libs + boost_libs + ["-lpython"+sys.version[:3]]
|
commonlibs = SDL_libs + boost_libs + ["pthread", "-lpython"+sys.version[:3]]
|
||||||
|
|
||||||
#color_range.cpp should be removed, but game_config depends on it.
|
#color_range.cpp should be removed, but game_config depends on it.
|
||||||
#game_config has very few things that are needed elsewhere, it should be
|
#game_config has very few things that are needed elsewhere, it should be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user