Changeset 781

Show
Ignore:
Timestamp:
12/29/07 02:16:19 (16 years ago)
Author:
ppalmers
Message:

add profile build option (no debug messages, optimization and debug symbols)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r780 r781  
    4949Toggle debug-build. DEBUG means \"-g -Wall\" and more, otherwise we will use 
    5050  \"-O2\" to optimise.""", True ), 
     51        BoolOption( "PROFILE", "Build with symbols and other profiling info", False ), 
    5152        PathOption( "PREFIX", "The prefix where ffado will be installed to.", "/usr/local", PathOption.PathAccept ), 
    5253        PathOption( "BINDIR", "Overwrite the directory where apps are installed to.", "$PREFIX/bin", PathOption.PathAccept ), 
     
    190191        print "Doing a DEBUG build" 
    191192        # -Werror could be added to, which would force the devs to really remove all the warnings :-) 
    192         env.AppendUnique( CCFLAGS=["-DDEBUG","-Wall","-g"] ) # HACK!! 
     193        env.AppendUnique( CCFLAGS=["-DDEBUG","-Wall","-g"] ) 
     194        env.AppendUnique( CFLAGS=["-DDEBUG","-Wall","-g"] ) 
    193195else: 
    194196        env.AppendUnique( CCFLAGS=["-O2","-DNDEBUG"] ) 
     197        env.AppendUnique( CFLAGS=["-O2","-DNDEBUG"] ) 
     198 
     199if env['PROFILE']: 
     200        print "Doing a PROFILE build" 
     201        # -Werror could be added to, which would force the devs to really remove all the warnings :-) 
     202        env.AppendUnique( CCFLAGS=["-Wall","-g"] ) 
     203        env.AppendUnique( CFLAGS=["-Wall","-g"] ) 
     204 
    195205 
    196206# this is required to indicate that the DBUS version we use has support 
     
    294304    opt_flags.extend (["-fomit-frame-pointer","-ffast-math","-funroll-loops"]) 
    295305    env.AppendUnique( CCFLAGS=opt_flags ) 
     306    env.AppendUnique( CFLAGS=opt_flags ) 
    296307    print "Doing an optimized build..." 
    297308