Author: esr
Date: Mon Mar 24 03:36:13 2008
New Revision: 25043
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25043&view=rev
Log:
Support more configuration flags in scons.
Modified:
trunk/SConstruct
trunk/src/SConstruct
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25043&r1=25042&r2=25043&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Mon Mar 24 03:36:13 2008
@@ -24,7 +24,7 @@
opts.Add(BoolOption('debug', '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('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('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))
@@ -83,11 +83,13 @@
cc_version = env["CCVERSION"]
-debug = ARGUMENTS.get('debug', 'no')
-if debug == "yes":
+if env["debug"] == "yes":
env["CXXFLAGS"] = Split("-O0 -DDEBUG -ggdb3 -W -Wall -ansi")
else:
env["CXXFLAGS"] = Split("-O2 -ansi")
+
+if env['static']:
+ env["LDFLAGS"].append("-all-static")
if env['profile']:
env["CXXFLAGS"].append("-pg")
@@ -223,18 +225,6 @@
env.Append(BUILDERS = {'Wesconfig' : wesconfig_builder})
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:
# mode: python
# end:
Modified: trunk/src/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConstruct?rev=25043&r1=25042&r2=25043&view=diff
==============================================================================
--- trunk/src/SConstruct (original)
+++ trunk/src/SConstruct Mon Mar 24 03:36:13 2008
@@ -10,8 +10,8 @@
# Libraries and source groups
#
boost_libs = Split("boost_iostreams-mt boost_regex")
-SDL_libs = Split("SDL_net SDL_ttf SDL_mixer SDL pthread SDL_image")
-commonlibs = SDL_libs + boost_libs + ["-lpython"+sys.version[:3]]
+SDL_libs = Split("SDL_net SDL_ttf SDL_mixer SDL_image SDL")
+commonlibs = SDL_libs + boost_libs + ["pthread", "-lpython"+sys.version[:3]]
#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
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits