Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31773/src
Modified Files: Tag: devel_0_39 SConscript Log Message: additions to build app_pkg on OSX
Index: SConscript =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/SConscript,v retrieving revision 1.1.4.47 retrieving revision 1.1.4.48 diff -C2 -d -r1.1.4.47 -r1.1.4.48 *** SConscript 23 Apr 2006 11:54:14 -0000 1.1.4.47 --- SConscript 28 Jul 2006 14:59:11 -0000 1.1.4.48 *************** *** 42,50 **** ('pthreadspath', 'Path to pthreads', None), ) - elif pdenv['PLATFORM'] == 'darwin': - opt.AddOptions( - ('portmidipath', 'Path to portmidi','../portmidi_osx'), - BoolOption('app_pkg', 'Build for inclusion in .app package', False), - )
--- 42,45 ---- *************** *** 157,174 ****
if pdenv['PLATFORM'] == 'darwin': ! portaudio = True ! ! if conf.CheckLib('dl', 'dlopen'): ! defs.append('DL_OPEN') ! else: ! print "libdl not found. dynamic loading of externals disabled"
! ## hardcoding the search paths ... ugly, but works ! if not pdenv['app_pkg']: ! pdenv.Append(CPPPATH=Split("""/Library/Frameworks/Tk.framework/Headers/ ! /Library/Frameworks/Tcl.framework/Headers/""")) ! else: ! pdenv.Append(CPPPATH=Split("""@executable_path/../Frameworks/Tk.framework/Headers/ ! @executable_path/../Frameworks/Tcl.framework/Headers/"""))
--- 152,174 ----
if pdenv['PLATFORM'] == 'darwin': ! portaudio = True ! ! if conf.CheckLib('dl', 'dlopen'): ! defs.append('DL_OPEN') ! else: ! print "libdl not found. dynamic loading of externals disabled" ! ! if conf.CheckLib('jack','jack_activate'): ! jack = True ! else: ! print "jack not found, so it's not enabled"
! ## hardcoding the search paths ... ugly, but works ! if not pdenv['app_pkg']: ! pdenv.Append(CPPPATH=Split("""/Library/Frameworks/Tk.framework/Headers/ ! /Library/Frameworks/Tcl.framework/Headers/""")) ! else: ! pdenv.Append(CPPPATH=Split("""@executable_path/../Frameworks/Tk.framework/Headers/ ! @executable_path/../Frameworks/Tcl.framework/Headers/"""))
*************** *** 341,345 **** sources += pa_sources+pa_common_sources sources += map(lambda x: papath+x, ! Split(""" /pa_asio/pa_asio.cpp /pa_win/pa_win_hostapis.c --- 341,345 ---- sources += pa_sources+pa_common_sources sources += map(lambda x: papath+x, ! Split(""" /pa_asio/pa_asio.cpp /pa_win/pa_win_hostapis.c *************** *** 350,355 **** /pa_win_wmme/pa_win_wmme.c /pa_win_wdmks/pa_win_wdmks.c ! """) ! ) pdenv.Append(LIBS="SetupApi")
--- 350,355 ---- /pa_win_wmme/pa_win_wmme.c /pa_win_wdmks/pa_win_wdmks.c ! """) ! ) pdenv.Append(LIBS="SetupApi")
*************** *** 427,461 **** # # osx configuration - if pdenv['PLATFORM'] == 'darwin': - pmpath = pdenv['portmidipath']
! pm_osx_sources = map(lambda x: pmpath+x, ! Split(""" ! /pm_mac/pmmac.c ! /pm_mac/pmmacosxcm.c ! /pm_common/pmutil.c ! /pm_common/portmidi.c ! /porttime/porttime.c ! /porttime/ptmacosx_cf.c ! """) ! ) ! pa_osx_sources = map(lambda x: papath+x, ! Split(""" ! /pa_mac_core/pa_mac_core.c ! /pa_mac/pa_mac_hostapis.c ! /pa_unix/pa_unix_util.c ! """) ! ) osx_sources = pa_sources + pa_common_sources + pa_osx_sources + pm_sources + pm_osx_sources + simd_ve_gcc_sources
! osx_defs = Split("UNISTD PA_BIG_ENDIAN PA_USE_COREAUDIO MACOSX")
sources.append(osx_sources) ! pdenv.Append(CPPPATH=[pmpath+'/pm_common',pmpath+'/porttime',pmpath+"/pm_mac"]) pdenv.Append(CPPDEFINES=osx_defs)
pdenv.Append(LINKFLAGS=" -framework CoreAudio -framework AudioUnit " ! +" -framework AudioToolbox -framework Carbon -framework CoreMIDI") ldflags = ''
--- 427,470 ---- # # osx configuration if pdenv['PLATFORM'] == 'darwin':
! pmpath = pdenv['portmidipath'] ! pm_osx_sources = map(lambda x: pmpath + x, ! Split(""" ! /pm_mac/pmmac.c ! /pm_mac/pmmacosxcm.c ! /pm_common/pmutil.c ! /pm_common/portmidi.c ! /porttime/porttime.c ! /porttime/ptmacosx_cf.c ! """) ! ) ! pa_osx_sources = map(lambda x: papath + x, ! Split(""" ! /pa_mac_core/pa_mac_core.c ! /pa_mac/pa_mac_hostapis.c ! /pa_unix/pa_unix_util.c ! """) ! ) osx_sources = pa_sources + pa_common_sources + pa_osx_sources + pm_sources + pm_osx_sources + simd_ve_gcc_sources
! osx_defs = Split("UNISTD PA_USE_COREAUDIO MACOSX") ! ! # if pdenv['portaudio']: ! # osx_sources += pa_sources ! ! if jack: ! jack_sources = Split("s_audio_jack.c") ! osx_sources.append(jack_sources) ! osx_defs.append("USEAPI_JACK") ! pdenv.Append(LINKFLAGS=" -weak_framework Jack")
sources.append(osx_sources) ! pdenv.Append(CPPPATH=[pmpath,pmpath+'/pm_common',pmpath+'/porttime',pmpath+"/pm_mac"]) pdenv.Append(CPPDEFINES=osx_defs)
pdenv.Append(LINKFLAGS=" -framework CoreAudio -framework AudioUnit " ! +" -framework AudioToolbox -framework Carbon -framework CoreMIDI " ! +" -mmacosx-version-min=10.3 -lgcc") ldflags = ''
*************** *** 516,520 **** cflags += " /Ox" else: ! cflags += " -O3"
if pdenv.Dictionary().has_key('optimize'): --- 525,532 ---- cflags += " /Ox" else: ! if pdenv['PLATFORM'] != 'darwin': ! cflags += " -O3" ! else: ! cflags =+ " -Os"
if pdenv.Dictionary().has_key('optimize'): *************** *** 547,550 **** --- 559,566 ---- flags += " -mms-bitfields" ## binary compatibility with msvc
+ if pdenv['PLATFORM'] == 'darwin': + if pdenv['lockfree']: + cflags += " -fnested-functions -fasm-blocks" + ###################################################################### #