Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11085/src
Modified Files:
Tag: devel_0_39
SConscript
Log Message:
Windows compilation: now covers all features and yields working executable
Index: SConscript
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/SConscript,v
retrieving revision 1.1.4.31
retrieving revision 1.1.4.32
diff -C2 -d -r1.1.4.31 -r1.1.4.32
*** SConscript 7 Oct 2005 22:15:11 -0000 1.1.4.31
--- SConscript 8 Oct 2005 09:39:42 -0000 1.1.4.32
***************
*** 8,11 ****
--- 8,15 ----
opt = Options(['options.cache', 'custom.py'])
+
+
+ # general options
+
opt.AddOptions(
BoolOption('debug', 'Build with debugging symbols', False),
***************
*** 13,36 ****
BoolOption('daz', 'Build using DAZ flag on x86-SSE2 cpus (must be set to False for AMD cpus)', False),
BoolOption('portaudio', 'Build with portaudio', True),
! BoolOption('asio', 'Build with native ASIO (for Windows)', False),
BoolOption('threadedsf', 'Build with threaded soundfiler', False),
BoolOption('atomic', 'Build with atomic operations', False),
BoolOption('newhash', 'Build with 16 bit symbol hash table', True),
! BoolOption('lockfree', 'Build with lock-free fifos', True),
BoolOption('pdlib', 'Build with pdlib', False),
! BoolOption('app_pkg', 'Build for inclusion in .app package - OSX only', False),
! ('optimize', 'Optimize for specific architecture', None),
('prefix', 'install prefix', '/usr/local'),
BoolOption('desire', 'Build with desire', False),
BoolOption('wall', 'Build with a wall of warnings', False),
- BoolOption('shared', 'Build against shared C libraries (for Windows)', True),
)
if pdenv['PLATFORM'] == 'win32':
opt.AddOptions(
('asiopath', 'Path to ASIOSDK', None),
('tclpath', 'Path to tcl', None),
! ('pthreadspath', 'Path to pthreads', None)
! )
--- 17,49 ----
BoolOption('daz', 'Build using DAZ flag on x86-SSE2 cpus (must be set to False for AMD cpus)', False),
BoolOption('portaudio', 'Build with portaudio', True),
! ('portaudiopath', 'Path to portaudio','../portaudio'),
BoolOption('threadedsf', 'Build with threaded soundfiler', False),
BoolOption('atomic', 'Build with atomic operations', False),
BoolOption('newhash', 'Build with 16 bit symbol hash table', True),
! BoolOption('lockfree', 'Build with lock-free fifos (not working for 1st generation AMD64)', True),
BoolOption('pdlib', 'Build with pdlib', False),
! ('optimize', 'Optimize for specific architecture (give cpu model)', None),
('prefix', 'install prefix', '/usr/local'),
BoolOption('desire', 'Build with desire', False),
BoolOption('wall', 'Build with a wall of warnings', False),
)
+
+ #platform-specific options
+
if pdenv['PLATFORM'] == 'win32':
opt.AddOptions(
+ BoolOption('shared', 'Build against shared C libraries', True),
+ # BoolOption('mmio', 'Build with MMIO audio interface', True),
+ BoolOption('asio', 'Build with native ASIO interface', False),
('asiopath', 'Path to ASIOSDK', None),
('tclpath', 'Path to tcl', None),
! ('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),
! )
***************
*** 128,132 ****
pdenv.Append(LIBPATH=[path_asio])
- # portaudio = False
sep = ""
if 'msvc' in pdenv['TOOLS']:
--- 141,144 ----
***************
*** 271,284 ****
#
# portaudio stuff
! pa_common_sources = map(lambda x: '../portaudio/pa_common/' + x,
! Split("""pa_allocation.c
! pa_converters.c
! pa_cpuload.c
! pa_dither.c
! pa_front.c
! pa_process.c
! pa_skeleton.c
! pa_stream.c
! pa_trace.c"""))
--- 283,302 ----
#
# portaudio stuff
!
! papath = pdenv['portaudiopath']
!
! pa_common_sources = map(lambda x: papath+'/pa_common/' + x,
! Split("""
! pa_allocation.c
! pa_converters.c
! pa_cpuload.c
! pa_dither.c
! pa_front.c
! pa_process.c
! pa_skeleton.c
! pa_stream.c
! pa_trace.c
! """)
! )
***************
*** 289,307 ****
if pdenv['PLATFORM'] == 'win32':
! pdenv.Append(CPPDEFINES=["MSW","NT","USEAPI_MMIO"])
# this is needed for ASIO
pdenv.Append(CPPDEFINES="WIN32")
! # # these are additional ones from the original makefile - we shouldn't really need them, but need to make sure
! # pdenv.Append(CPPDEFINES=["_CONSOLE","WINDOWS","__i386__","_WINDOWS"])
pdenv.Append(LIBS=Split("user32 ole32 winmm wsock32 advapi32"))
! sources += Split("s_audio_mmio.c s_midi_mmio.c")
! if pdenv['asio']:
# enable native ASIO support
- sources += ["s_audio_asio.cpp"]
- sources += [path_asio+"/common/asio.cpp",path_asio+"/host/asiodrivers.cpp",path_asio+"/host/pc/asiolist.cpp"]
pdenv.Append(CPPDEFINES="USEAPI_ASIO")
pdenv.Append(LIBS="asiolib")
--- 307,355 ----
if pdenv['PLATFORM'] == 'win32':
! pdenv.Append(CPPDEFINES=["MSW","NT"])
# this is needed for ASIO
pdenv.Append(CPPDEFINES="WIN32")
!
! # # these are additional ones from the original makefile - we shouldn't really need them
! # pdenv.Append(CPPDEFINES=["WINDOWS","__i386__","_WINDOWS"])
!
! # in debug mode, make it a console application, in release a native Windows one
! if pdenv['debug']:
! pdenv.Append(CPPDEFINES="_CONSOLE")
pdenv.Append(LIBS=Split("user32 ole32 winmm wsock32 advapi32"))
! sources += Split("s_midi_mmio.c")
! # PD wants to have MMIO in any case
! pdenv.Append(CPPDEFINES="USEAPI_MMIO")
! sources += Split("s_audio_mmio.c")
!
! if pdenv['portaudio']:
! pdenv.Append(CPPDEFINES="USEAPI_PORTAUDIO")
! sources += pa_sources+pa_common_sources
! sources += map(lambda x: papath+x,
! Split("""
! /pa_asio/pa_asio.cpp
! /pa_win/pa_win_hostapis.c
! /pa_win/pa_win_util.c
! /pa_win/pa_x86_plain_converters.c
! /pa_win_ds/pa_win_ds.c
! /pa_win_ds/dsound_wrapper.c
! /pa_win_wmme/pa_win_wmme.c
! """)
! )
!
! if pdenv['asio'] or pdenv['portaudio']:
# enable native ASIO support
pdenv.Append(CPPDEFINES="USEAPI_ASIO")
+ sources += ["s_audio_asio.cpp"]
+ sources += map(lambda x: path_asio+x,
+ Split("""
+ /common/asio.cpp
+ /host/asiodrivers.cpp
+ /host/pc/asiolist.cpp
+ """)
+ )
pdenv.Append(LIBS="asiolib")
***************
*** 311,315 ****
sources += simd_sse_gcc_sources
! pdenv['pdlib'] = True ## split pd to pd.exe and pd.dll
######################################################################
--- 359,364 ----
sources += simd_sse_gcc_sources
! # split pd to pd.exe and pd.dll
! pdenv['pdlib'] = True
######################################################################
***************
*** 319,330 ****
jack_sources = Split("s_audio_jack.c")
! alsa_sources = Split("""s_audio_alsamm.c
! s_audio_alsa.c""")
oss_sources = Split("s_audio_oss.c")
! pa_linux_sources = Split("""../portaudio/pa_unix/pa_unix_util.c
! ../portaudio/pa_unix/pa_unix_hostapis.c
! ../portaudio/pa_unix_oss/pa_unix_oss.c""")
!
linux_defs = Split("UNISTD UNIX USEAPI_OSS PA_LITTLE_ENDIAN PA_USE_OSS")
linux_defs.append('INSTALL_PREFIX=\\\"%s\\\"' % pdenv['prefix'])
--- 368,381 ----
jack_sources = Split("s_audio_jack.c")
! alsa_sources = Split("s_audio_alsamm.c s_audio_alsa.c")
oss_sources = Split("s_audio_oss.c")
! pa_linux_sources = map(lambda x: papath+x,
! Split("""
! /pa_unix/pa_unix_util.c
! /pa_unix/pa_unix_hostapis.c
! /pa_unix_oss/pa_unix_oss.c
! """)
! )
linux_defs = Split("UNISTD UNIX USEAPI_OSS PA_LITTLE_ENDIAN PA_USE_OSS")
linux_defs.append('INSTALL_PREFIX=\\\"%s\\\"' % pdenv['prefix'])
***************
*** 341,345 ****
if alsa:
linux_sources.append(alsa_sources)
! linux_sources.append('../portaudio/pa_linux_alsa/pa_linux_alsa.c')
linux_defs.append("USEAPI_ALSA")
linux_defs.append("PA_USE_ALSA")
--- 392,396 ----
if alsa:
linux_sources.append(alsa_sources)
! linux_sources.append(papath+'/pa_linux_alsa/pa_linux_alsa.c')
linux_defs.append("USEAPI_ALSA")
linux_defs.append("PA_USE_ALSA")
***************
*** 363,377 ****
if pdenv['PLATFORM'] == 'darwin':
! pm_osx_sources = Split("""../portmidi_osx/pmdarwin.c
! ../portmidi_osx/pmmacosx.c
! ../portmidi_osx/pmutil.c
! ../portmidi_osx/portmidi.c
! ../portmidi_osx/ptdarwin.c""")
!
! pa_osx_sources = (Split("""../portaudio/pa_mac_core/pa_mac_core.c
! ../portaudio/pa_mac/pa_mac_hostapis.c
! ../portaudio/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
--- 414,435 ----
if pdenv['PLATFORM'] == 'darwin':
! pmpath = pdenv['portmidipath']
+ pm_osx_sources = map(lambda x: pmpath+x,
+ Split("""
+ /pmdarwin.c
+ /pmmacosx.c
+ /pmutil.c
+ /portmidi.c
+ /ptdarwin.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
***************
*** 379,383 ****
sources.append(osx_sources)
! pdenv.Append(CPPPATH='../portmidi_osx/')
pdenv.Append(CPPDEFINES=osx_defs)
--- 437,441 ----
sources.append(osx_sources)
! pdenv.Append(CPPPATH=pmpath)
pdenv.Append(CPPDEFINES=osx_defs)
***************
*** 402,406 ****
if pdenv['portaudio']:
pdenv.Append(CPPDEFINES=Split("USEAPI_PORTAUDIO PA19"))
! pdenv.Append(CPPPATH=Split("../portaudio/pa_common ../portaudio/pablio"))
--- 460,464 ----
if pdenv['portaudio']:
pdenv.Append(CPPDEFINES=Split("USEAPI_PORTAUDIO PA19"))
! pdenv.Append(CPPPATH=[papath+'/pa_common',papath+'/pablio'])
***************
*** 426,430 ****
cflags += ' /Od /Zi'
! lflags += ' /DEBUG'
else:
flags += " -g"
--- 484,488 ----
cflags += ' /Od /Zi'
! lflags += ' /DEBUG /INCREMENTAL:NO'
else:
flags += " -g"