Преглед изворни кода

add build opt successfully!

tanghai пре 15 година
родитељ
комит
76d0d4d395
2 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 1
      SConstruct
  2. 0 1
      src/SConscript

+ 6 - 1
SConstruct

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

+ 0 - 1
src/SConscript

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