Changeset 1853
- Timestamp:
- 06/13/10 07:34:09 (2 years ago)
- Files:
-
- trunk/libffado/SConstruct (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/SConstruct
r1830 r1853 1 1 #! /usr/bin/python 2 # -*- coding: utf-8 -*- 2 3 # 3 4 # Copyright (C) 2007, 2008, 2010 Arnold Krille … … 74 75 BoolOption( "ENABLE_OPTIMIZATIONS", "Enable optimizations and the use of processor specific extentions (MMX/SSE/...).", False ), 75 76 BoolOption( "PEDANTIC", "Enable -Werror and more pedantic options during compile.", False ), 77 ( "COMPILE_FLAGS", "Add additional flags to the environment.\nOnly meant for distributors and gentoo-users who want to over-optimize their built.\n Using this is not supported by the ffado-devs!" ), 76 78 77 79 ) … … 79 81 ## Load the builders in config 80 82 buildenv=os.environ 81 vars_to_check = [82 'PATH',83 'PKG_CONFIG_PATH',84 'LD_LIBRARY_PATH',85 'XDG_CONFIG_DIRS',86 'XDG_DATA_DIRS',87 'HOME',88 'CC',89 'CFLAGS',90 'CXX',91 'CXXFLAGS',92 'CPPFLAGS',93 ]94 for var in vars_to_check:95 if os.environ.has_key(var):96 buildenv[var]=os.environ[var]97 else:98 buildenv[var]=''99 83 100 84 env = Environment( tools=['default','scanreplace','pyuic','pyuic4','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts ) 101 85 102 if os.environ.has_key('LDFLAGS'): 103 env['LINKFLAGS'] = os.environ['LDFLAGS'] 104 105 # grab OS CFLAGS / CCFLAGS 106 env['OS_CFLAGS']=[] 107 if os.environ.has_key('CFLAGS'): 108 env['OS_CFLAGS'] = os.environ['CFLAGS'] 109 env['OS_CCFLAGS']=[] 110 if os.environ.has_key('CCFLAGS'): 111 env['OS_CCFLAGS'] = os.environ['CCFLAGS'] 86 if env.has_key('COMPILE_FLAGS') and len(env['COMPILE_FLAGS']) > 0: 87 print ''' 88 * Usage of additional flags is not supported by the ffado-devs. 89 * Use at own risk! 90 * 91 * Currentl value is '%s' 92 ''' % env['COMPILE_FLAGS'] 93 env.MergeFlags(env['COMPILE_FLAGS']) 112 94 113 95 Help( """ … … 505 487 env.MergeFlags( "-m32" ) 506 488 507 if needs_fPIC or '-fPIC' in env['OS_CFLAGS'] or "-fPIC" in env['OS_CCFLAGS']:489 if needs_fPIC or ( env.has_key('COMPILE_FLAGS') and '-fPIC' in env['COMPILE_FLAGS'] ): 508 490 env.MergeFlags( "-fPIC" ) 509 491
