summaryrefslogtreecommitdiffstats
path: root/gears/SConscript.portaudio
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 20:01:24 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 20:01:24 +0000
commit777c7bff9d40214069752a8ca91ade106a60536b (patch)
tree79bb2ed5b72f896eb32564c35e983e994ed913ea /gears/SConscript.portaudio
parentdf06096817e6fc5a4a3e53b863cd4c439271ba45 (diff)
downloadchromium_src-777c7bff9d40214069752a8ca91ade106a60536b.zip
chromium_src-777c7bff9d40214069752a8ca91ade106a60536b.tar.gz
chromium_src-777c7bff9d40214069752a8ca91ade106a60536b.tar.bz2
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
Diffstat (limited to 'gears/SConscript.portaudio')
-rw-r--r--gears/SConscript.portaudio45
1 files changed, 42 insertions, 3 deletions
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)