summaryrefslogtreecommitdiff
blob: 7e80cf943e40a44767bc0fa61ce869bd82fb305d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Sólo en adchpp_2.8.1_source: .sconsign.dblite
diff -ur adchpp_2.8.1_source.orig//SConstruct adchpp_2.8.1_source/SConstruct
--- adchpp_2.8.1_source.orig//SConstruct	2012-09-17 09:30:08.016122458 +0200
+++ adchpp_2.8.1_source/SConstruct	2012-09-17 10:27:40.237129827 +0200
@@ -6,9 +6,9 @@
 from build_util import Dev
 
 gcc_flags = {
-	'common': ['-g', '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-fexceptions'],
+	'common': ['-fexceptions'],
 	'debug': [], 
-	'release' : ['-O3']
+	'release' : []
 }
 
 gcc_xxflags = {
@@ -42,7 +42,7 @@
 }
 
 gcc_link_flags = {
-	'common' : ['-g', '-Wl,--no-undefined', '-time'],
+	'common' : ['-Wl,--no-undefined', '-time'],
 	'debug' : [],
 	'release' : []				
 }
@@ -73,6 +73,22 @@
 langs = ['lua', 'python', 'ruby']
 
 defEnv = Environment(ENV = os.environ)
+
+if 'CC' in os.environ:
+	defEnv.Replace(CC = os.environ['CC'])
+
+if 'CXX' in os.environ:
+	defEnv.Replace(CXX = os.environ['CXX'])
+
+if 'CCFLAGS' in os.environ:
+	defEnv.Replace(CCFLAGS = os.environ['CCFLAGS'].split())
+
+if 'CXXFLAGS' in os.environ:
+	defEnv.Replace(CXXFLAGS = os.environ['CXXFLAGS'].split())
+
+if 'LINKFLAGS' in os.environ:
+	defEnv.Replace(CXXFLAGS = os.environ['LINKFLAGS'].split())
+
 opts = Variables('custom.py', ARGUMENTS)
 
 if sys.platform == 'win32':
@@ -107,6 +123,21 @@
 
 env = Environment(ENV = os.environ, tools = [defEnv['tools'], 'swig'], toolpath = ['tools'], options = opts, TARGET_ARCH = TARGET_ARCH, MSVS_ARCH = TARGET_ARCH)
 
+if 'CC' in os.environ:
+	env.Replace(CC = os.environ['CC'])
+
+if 'CXX' in os.environ:
+	env.Replace(CXX = os.environ['CXX'])
+
+if 'CCFLAGS' in os.environ:
+	env.Replace(CCFLAGS = os.environ['CCFLAGS'].split())
+
+if 'CXXFLAGS' in os.environ:
+	env.Replace(CXXFLAGS = os.environ['CXXFLAGS'].split())
+
+if 'LINKFLAGS' in os.environ:
+	env.Replace(CXXFLAGS = os.environ['LINKFLAGS'].split())
+
 # filter out boost from dependencies to get a speedier rebuild scan
 # this means that if boost changes, scons -c needs to be run
 # delete .sconsign.dblite to see the effects of this if you're upgrading
@@ -139,8 +170,6 @@
 
 	if env['savetemps']:
 		env.Append(CCFLAGS = ['-save-temps', '-fverbose-asm'])
-	else:
-		env.Append(CCFLAGS = ['-pipe'])
 
 if env['CC'] == 'cl': # MSVC
 	flags = msvc_flags