mail[Wesnoth-commits] r25165 - /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 - 19:09:
Author: esr
Date: Wed Mar 26 19:09:24 2008
New Revision: 25165

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25165&view=rev
Log:
Accept passed-in LDFLAGS and CXXFLAGS.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25165&r1=25164&r2=25165&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Wed Mar 26 19:09:24 2008
@@ -128,8 +128,9 @@
 #
 extralibs=[]
 
-# This is so we don't need separate link lists for each binary
-env["LINKFLAGS"].append("-Wl,-as-needed")
+# FIXME: Unix-specific.
+# Link only on demand, 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")
@@ -175,6 +176,12 @@
     env["datadir"] = os.path.join(env["prefix"], env["datadir"])
 
 env["CXXFLAGS"].append("-DWESNOTH_PATH='\"%s\"'" % env['datadir'])
+
+if 'CXXFLAGS' in os.environ:
+    env["CXXFLAGS"].append(CXXFLAGS = os.environ['CXXFLAGS'])
+
+if 'LDFLAGS' in os.environ:
+    env["LINKFLAGS"].append(LINKFLAGS = os.environ['LDFLAGS'])
 
 cc_version = env["CCVERSION"]
 if env["CC"] == "gcc":
@@ -186,9 +193,11 @@
 #
 # Libraries and source groups
 #
+# The png library specification is not needed everywhere.  Some versions of
+# (probably) SDL_image must carry it internally.
 boost_libs = Split("boost_iostreams-mt boost_regex")
 SDL_libs = Split("SDL_net SDL_ttf SDL_mixer SDL_image SDL")
-commonlibs = SDL_libs + boost_libs + ["pthread", "-lpython"+sys.version[:3]]
+commonlibs = SDL_libs + boost_libs + ["pthread", "png", 
"-lpython"+sys.version[:3]]
 commonpath = ['src', '/usr/include/SDL', '/usr/include/python%s' % 
sys.version[:3]]
 
 #color_range.cpp should be removed, but game_config depends on it.




Related Messages


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