File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ import os
4
4
import sys
5
5
import ConfigParser
6
6
7
+ mymode = ARGUMENTS .get ('mode' , 'release' )
8
+
9
+ if not (mymode in ['debug' , 'release' ]):
10
+ print "Error: expected 'debug' or 'release', found: " + mymode
11
+ Exit (1 )
12
+
7
13
config = ConfigParser .RawConfigParser ()
8
14
9
15
config .read ( [
@@ -55,7 +61,6 @@ env.Append(
55
61
CXXFLAGS = [
56
62
'-Wall' ,
57
63
'-fPIC' ,
58
- '-g'
59
64
],
60
65
LIBPATH = [
61
66
libavLibDir ,
@@ -163,7 +168,18 @@ Export( "resampleLibraryName" )
163
168
VariantDir ( 'build/src' , 'src' , duplicate = 0 )
164
169
VariantDir ( 'build/app' , 'app' , duplicate = 0 )
165
170
166
- SConscript ( [
171
+
172
+ if mymode == "release" :
173
+ env .Append (CCFLAGS = ['-O3' ])
174
+ if mymode == "debug" :
175
+ env .Append (CCFLAGS = ['-pg' ])
176
+
177
+ sconscripts = [
167
178
'build/src/SConscript' ,
168
179
'build/app/SConscript' ,
169
- ] )
180
+ ]
181
+
182
+ SConscript ('src/SConscript' , variant_dir = 'build/' + mymode + '/src' , exports = {'env' :env })
183
+ SConscript ('app/SConscript' , variant_dir = 'build/' + mymode + '/app' , exports = {'env' :env })
184
+
185
+
You can’t perform that action at this time.
0 commit comments