OLD | NEW |
| (Empty) |
1 # Copyright (c) 2008 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 Import('env') | |
6 | |
7 env = env.Clone( | |
8 ) | |
9 | |
10 env.Replace( | |
11 PA_DIR = '$THIRD_PARTY_DIR/portaudio', | |
12 CPPPATH = [ | |
13 '$PA_DIR/include', | |
14 '$PA_DIR/src/common', | |
15 '$VC80_CPPPATH', | |
16 ], | |
17 ) | |
18 | |
19 env.Append( | |
20 CPPDEFINES = [ | |
21 'PA_NO_DS', | |
22 'PA_NO_ASIO', | |
23 ], | |
24 ) | |
25 | |
26 if env['OS'] in ['win32', 'wince']: | |
27 env.Append( | |
28 CPPPATH = [ | |
29 '$PA_DIR/src/os/win', | |
30 ], | |
31 CPPFLAGS = [ | |
32 '/wd4133', | |
33 '/wd4101', | |
34 ], | |
35 ) | |
36 elif env['OS'] == 'linux': | |
37 env.Append( | |
38 CPPPATH = [ | |
39 '$PA_DIR/src/os/unix', | |
40 ], | |
41 CPPFLAGS = [ | |
42 # disable some warnings | |
43 '-Wno-unused-variable', | |
44 # enable multithreading support with pthread library | |
45 '-pthread', | |
46 ], | |
47 CPPDEFINES = [ | |
48 # build only the OSS hostapi for linux | |
49 'PA_USE_OSS', | |
50 'HAVE_SYS_SOUNDCARD_H=1', | |
51 ], | |
52 ) | |
53 elif env['OS'] == 'osx': | |
54 env.Append( | |
55 CPPPATH = [ | |
56 '$PA_DIR/src/hostapi/coreaudio', | |
57 '$PA_DIR/src/hostapi/mac_osx', | |
58 '$PA_DIR/src/os/unix', | |
59 ], | |
60 CPPFLAGS = [ | |
61 # disable some warnings | |
62 '-Wno-unused-variable', | |
63 '-Wno-uninitialized', | |
64 ], | |
65 CPPDEFINES = [ | |
66 'PA_USE_COREAUDIO', | |
67 ], | |
68 ) | |
69 | |
70 input_files = [ | |
71 '$PA_DIR/src/common/pa_allocation.c', | |
72 '$PA_DIR/src/common/pa_converters.c', | |
73 '$PA_DIR/src/common/pa_cpuload.c', | |
74 '$PA_DIR/src/common/pa_debugprint.c', | |
75 '$PA_DIR/src/common/pa_dither.c', | |
76 '$PA_DIR/src/common/pa_front.c', | |
77 '$PA_DIR/src/common/pa_process.c', | |
78 '$PA_DIR/src/common/pa_skeleton.c', | |
79 '$PA_DIR/src/common/pa_stream.c', | |
80 '$PA_DIR/src/common/pa_trace.c', | |
81 ] | |
82 | |
83 # Platform-specific inputs | |
84 if env['OS'] in ['win32', 'wince']: | |
85 input_files += [ | |
86 '$PA_DIR/src/hostapi/wmme/pa_win_wmme.c', | |
87 '$PA_DIR/src/os/win/pa_win_hostapis.c', | |
88 '$PA_DIR/src/os/win/pa_win_util.c', | |
89 '$PA_DIR/src/os/win/pa_win_waveformat.c', | |
90 ] | |
91 elif env['OS'] == 'linux': | |
92 input_files += [ | |
93 '$PA_DIR/src/hostapi/oss/pa_unix_oss.c', | |
94 '$PA_DIR/src/os/unix/pa_unix_hostapis.c', | |
95 '$PA_DIR/src/os/unix/pa_unix_util.c', | |
96 ] | |
97 elif env['OS'] == 'osx': | |
98 input_files += [ | |
99 '$PA_DIR/src/common/pa_ringbuffer.c', | |
100 '$PA_DIR/src/hostapi/coreaudio/pa_mac_core.c', | |
101 '$PA_DIR/src/hostapi/coreaudio/pa_mac_core_blocking.c', | |
102 '$PA_DIR/src/hostapi/coreaudio/pa_mac_core_utilities.c', | |
103 '$PA_DIR/src/os/mac_osx/pa_mac_hostapis.c', | |
104 '$PA_DIR/src/os/unix/pa_unix_util.c', | |
105 ] | |
106 | |
107 env.GearsStaticLibrary('portaudio', input_files) | |
OLD | NEW |