mail[Wesnoth-commits] r25164 - /trunk/SConstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on March 26, 2008 - 18:48:
Author: esr
Date: Wed Mar 26 18:48:17 2008
New Revision: 25164

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25164&view=rev
Log:
Use LINKFLAGS, not LDFLAGS.  Link only as needed.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25164&r1=25163&r2=25164&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Wed Mar 26 18:48:17 2008
@@ -47,7 +47,7 @@
 #
 
 # FIXME: Currently this will only work under Linux
-svnrev = commands.getoutput("svnversion -n 2>/dev/null")
+svnrev = commands.getoutput("svnversion -n . 2>/dev/null")
 
 env = Environment(options = opts)
 
@@ -85,13 +85,13 @@
 # Check some preconditions
 #
 
-if float(sys.version[:3]) < 2.4:
-    print "Python version is too old, 2.4 or greater is required,"
+targets = map(str, BUILD_TARGETS)
+
+if "wesnoth" in targets and float(sys.version[:3]) < 2.4:
+    print "Python version is too old for game, 2.4 or greater is required,"
     Exit(1)
 
-targets = map(str, BUILD_TARGETS)
-
-if ("wesnoth" in targets or "wesnoth_editor" in targets):
+if "wesnoth" in targets or "wesnoth_editor" in targets:
     if not conf.CheckLib('X11'):
         print "Needed X lib for game or editor and didn't find it; exiting!"
         Exit(1)
@@ -127,6 +127,9 @@
 # Implement configuration switches
 #
 extralibs=[]
+
+# This is so we don't need separate link lists for each binary
+env["LINKFLAGS"].append("-Wl,-as-needed")
 
 if env["debug"]:
     env["CXXFLAGS"] += Split("-O0 -DDEBUG -ggdb3 -W -Wall -ansi")
@@ -134,7 +137,7 @@
     env["CXXFLAGS"] += Split("-O2 -ansi")
 
 if env['static']:
-    env["LDFLAGS"].append("-all-static")
+    env["LINKFLAGS"].append("-all-static")
 
 if env['profile']:
     env["CXXFLAGS"].append("-pg")
@@ -642,6 +645,7 @@
 # 2. We don't check for Ogg Vorbis support in SDL_mixer
 # 3. Translations are not yet installed.
 # 4. Installation craps out with a mysterious "Is a directory" error.
+#    Data directory installation isn't done right anyway, as yet.
 # FIXME tags other problems
 
 # Local variables:




Related Messages


Powered by MHonArc, Updated Wed Mar 26 19:22:15 2008