From 777c7bff9d40214069752a8ca91ade106a60536b Mon Sep 17 00:00:00 2001 From: "mpcomplete@google.com" Date: Tue, 30 Sep 2008 20:01:24 +0000 Subject: Changes to make Gears build on linux. Review URL: http://codereview.chromium.org/5023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2726 0039d316-1c4b-4281-b951-d872f2087c98 --- gears/SConscript.portaudio | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'gears/SConscript.portaudio') diff --git a/gears/SConscript.portaudio b/gears/SConscript.portaudio index 6987457..46506b7 100644 --- a/gears/SConscript.portaudio +++ b/gears/SConscript.portaudio @@ -12,7 +12,6 @@ env.Replace( CPPPATH = [ '$PA_DIR/include', '$PA_DIR/src/common', - '$PA_DIR/src/os/win', ], ) @@ -23,13 +22,33 @@ env.Append( ], ) -if env['PLATFORM'] == 'win32': +if env['OS'] == 'win32': env.Append( + CPPPATH = [ + '$PA_DIR/src/os/win', + ], CPPFLAGS = [ '/wd4133', '/wd4101', ], ) +elif env['OS'] == 'linux': + env.Append( + CPPPATH = [ + '$PA_DIR/src/os/unix', + ], + CPPFLAGS = [ +# disable some warnings + '-Wno-unused-variable', +# enable multithreading support with pthread library + '-pthread', + ], + CPPDEFINES = [ +# build only the OSS hostapi for linux + 'PA_USE_OSS', + 'HAVE_SYS_SOUNDCARD_H=1', + ], + ) input_files = [ '$PA_DIR/src/common/pa_allocation.c', @@ -42,10 +61,30 @@ input_files = [ '$PA_DIR/src/common/pa_skeleton.c', '$PA_DIR/src/common/pa_stream.c', '$PA_DIR/src/common/pa_trace.c', +] + +# Platform-specific inputs +if env['OS'] == 'win32': + input_files += [ '$PA_DIR/src/hostapi/wmme/pa_win_wmme.c', '$PA_DIR/src/os/win/pa_win_hostapis.c', '$PA_DIR/src/os/win/pa_win_util.c', '$PA_DIR/src/os/win/pa_win_waveformat.c', -] + ] +elif env['OS'] == 'linux': + input_files += [ + '$PA_DIR/src/hostapi/oss/pa_unix_oss.c', + '$PA_DIR/src/os/unix/pa_unix_hostapis.c', + '$PA_DIR/src/os/unix/pa_unix_util.c', + ] +elif env['OS'] == 'osx': + input_files += [ + '$PA_DIR/src/common/pa_ringbuffer.c', + '$PA_DIR/src/hostapi/coreaudio/pa_mac_core.c', + '$PA_DIR/src/hostapi/coreaudio/pa_mac_core_blocking.c', + '$PA_DIR/src/hostapi/coreaudio/pa_mac_core_utilities.c', + '$PA_DIR/src/os/osx/pa_mac_hostapis.c', + '$PA_DIR/src/os/unix/pa_unix_util.c', + ] env.ChromeStaticLibrary('portaudio', input_files) -- cgit v1.1