Explorar o código

add build opt successfully!

tanghai %!s(int64=15) %!d(string=hai) anos
pai
achega
76d0d4d395
Modificáronse 2 ficheiros con 6 adicións e 2 borrados
  1. 6 1
      SConstruct
  2. 0 1
      src/SConscript

+ 6 - 1
SConstruct

@@ -8,9 +8,14 @@ def ParseOptions():
 		action='store',
 		action='store',
 		default='dbg',
 		default='dbg',
 		help='build in dbg or opt mode')
 		help='build in dbg or opt mode')
-	env['mode'] = GetOption('mode')
 
 
 ParseOptions()
 ParseOptions()
+env['mode'] = GetOption('mode')
+
+if env['mode'] == 'dbg':
+	env.Append(CCFLAGS='-g')
+else:
+	env.Append(CCFLAGS='-O2 -g')
 
 
 Export('env')
 Export('env')
 
 

+ 0 - 1
src/SConscript

@@ -5,5 +5,4 @@ subdirs = [
 ]
 ]
 
 
 for subdir in subdirs:
 for subdir in subdirs:
-	target_dir = env['mode'] + subdir
 	SConscript('%s/SConscript' % subdir)
 	SConscript('%s/SConscript' % subdir)