Commit 44d1b343f4db3977e6827af90f929dabc7b28095

Authored by Cédric RICARD
1 parent 751bdc15

Fix the DEBUG compile mode under Linux

Showing 1 changed file with 9 additions and 2 deletions   Show diff stats
anubis_dev/compiler/SConstruct
... ... @@ -23,8 +23,12 @@ compiler_output_name = 'anubis'
23 23  
24 24 if platform.system() == 'Linux':
25 25 env.Append(CPPDEFINES = {'_LINUX_': None})
26   - env.Append(CCFLAGS = ' -O2 -c -Wall -Wstrict-prototypes -m32')
  26 + env.Append(CCFLAGS = ' -c -Wall -Wstrict-prototypes -m32')
27 27 env.Append(LINKFLAGS = ' -m32')
  28 + if debug:
  29 + env.Append(CCFLAGS = ' -g3 -O0')
  30 + else:
  31 + env.Append(CCFLAGS = ' -O2')
28 32 if static:
29 33 env.Append(LINKFLAGS = '-static')
30 34 compiler_output_name = 'anubis_with_symbol'
... ... @@ -166,7 +170,10 @@ else:
166 170 anubis = npdenv.Program(compiler_output_name, main_obj + share_obj + special_obj + cipher_obj + rsc)
167 171  
168 172 if env['PLATFORM'] == 'posix':
169   - anubis = npdenv.Command('anubis', compiler_output_name, 'strip -o $TARGET $SOURCE')
  173 + if not debug:
  174 + anubis = npdenv.Command('anubis', compiler_output_name, 'strip -o $TARGET $SOURCE')
  175 + else:
  176 + anubis = npdenv.Command('anubis', compiler_output_name, 'cp $SOURCE $TARGET')
170 177  
171 178 if env['PLATFORM'] == 'posix':
172 179 installPath = os.path.join(env['BASEDIR'], 'anubis_distrib', 'linux_install', 'bin')
... ...