Deleted Added
sdiff udiff text old ( 3970:d54945bab95d ) new ( 3980:9bcb2a2e9bb8 )
full compact
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 297 unchanged lines hidden (view full) ---

306 stripped_bin = bin + '.stripped'
307 newEnv.Command(stripped_bin, bin, 'strip $SOURCE -o $TARGET')
308 bin = stripped_bin
309 targets = newEnv.Concat(exe, [bin, 'python/m5py.zip'])
310 newEnv.M5Binary = targets[0]
311 envList.append(newEnv)
312
313# Debug binary
314ccflags = {}
315if env['GCC']:
316 if sys.platform == 'sunos5':
317 ccflags['debug'] = '-gstabs+'
318 else:
319 ccflags['debug'] = '-ggdb3'
320 ccflags['opt'] = '-g -O3'
321 ccflags['fast'] = '-O3'
322 ccflags['prof'] = '-O3 -g -pg'
323elif env['SUNCC']:
324 ccflags['debug'] = '-g0'
325 ccflags['opt'] = '-g -O'
326 ccflags['fast'] = '-fast'
327 ccflags['prof'] = '-fast -g -pg'
328else:
329 print 'Unknown compiler, please fix compiler options'
330 Exit(1)
331
332makeEnv('debug', '.do',
333 CCFLAGS = Split(ccflags['debug']),
334 CPPDEFINES = ['DEBUG', 'TRACING_ON=1'])
335
336# Optimized binary
337makeEnv('opt', '.o',
338 CCFLAGS = Split(ccflags['opt']),
339 CPPDEFINES = ['TRACING_ON=1'])
340
341# "Fast" binary
342makeEnv('fast', '.fo', strip = True,
343 CCFLAGS = Split(ccflags['fast']),
344 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'])
345
346# Profiled binary
347makeEnv('prof', '.po',
348 CCFLAGS = Split(ccflags['prof']),
349 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
350 LINKFLAGS = '-pg')
351
352Return('envList')