Changeset 693 for trunk/Sconstruct

Show
Ignore:
Timestamp:
12/18/08 20:17:20 (4 years ago)
Author:
mauser
Message:

added support for coreaudio / several osx improvements

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Sconstruct

    r692 r693  
    5454                        cppflags += ['-O3', '-fomit-frame-pointer', '-funroll-loops'] 
    5555                        #cppflags += " %s" % get_optimized_flags( target_cpu ) 
    56                  
    57                 #add support for C++0X standard 
     56 
     57                #add support for C0X standard 
    5858                cppflags += ['-std=c++0x'] 
    59  
    6059 
    6160                if str(env['oss']) == "1": cppflags.append('-DOSS_SUPPORT') 
     
    6665                if str(env['portaudio']) == "1": cppflags.append('-DPORTAUDIO_SUPPORT') 
    6766                if str(env['portmidi']) == "1": cppflags.append('-DPORTMIDI_SUPPORT') 
    68  
     67                 
     68                if sys.platform == "darwin" and str(env['coreaudio']) == "1": cppflags.append('-DCOREAUDIO_SUPPORT') 
    6969 
    7070                cppflags.append('-DFLAC_SUPPORT') 
     
    8484 
    8585        elif sys.platform == 'darwin': 
    86                 pass 
     86                includes.append( [ '/sw/include', '/usr/local/include' ] ) 
     87                ldflags.append( [ '-L/sw/lib', '-F/sw/lib', '-F/sw/lib/qt4-mac/lib', '-L/usr/local/lib' ] ) 
     88 
    8789        elif sys.platform == "win32": 
    8890                includes.append( '3rdparty\libsndfile-1_0_17' ) 
     
    241243                env.Append( LIBS = [ "portmidi" ] ) 
    242244                env.Append( LIBS = [ "porttime" ] ) 
     245 
     246        if sys.platform == "darwin" and str(env['coreaudio']) == "1": 
     247                env.Append( LINKFLAGS = ['-framework','ApplicationServices']) 
     248                env.Append( LINKFLAGS = ['-framework','AudioUnit']) 
     249                env.Append( LINKFLAGS = ['-framework','Coreaudio']) 
     250 
     251 
     252 
    243253        env.Append( LIBPATH = '3rdparty\libsndfile-1_0_17' ) 
    244254        env.Append( LIBPATH = 'build\pthreads\lib' ) 
     
    286296 
    287297#platform dependent settings 
     298if sys.platform == "darwin": 
     299        opts.Add('coreaudio', 'Set to 1 to enable Coreaudio',1) 
     300 
    288301if sys.platform != "win32": 
    289302        opts.Add('oss', 'Set to 1 to enable oss',1) 
     
    433446print " portaudio: " + printStatus( env["portaudio"] ) 
    434447print "  portmidi: " + printStatus( env["portmidi"] )  
     448if sys.platform == "darwin": 
     449        print " coreaudio: " + printStatus( env["coreaudio"] ) 
    435450 
    436451print "\n================================================================="