1 # Copyright 2008, Google Inc.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
14 # * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 # Setup gtk hermetically.
47 env['GTK_DIR'] = '$SOURCE_ROOT/googleclient/third_party/gtk'
48 # 32-bit builds on 64-bit machines require symlinks to the local version
49 # in /usr/lib32 for the following libraries related to gtk:
53 # libgdk_pixbuf-2.0.so
54 # libpangocairo-1.0.so
62 # Optionally use pkg-config to get gtk.
63 # On 64-bit assume we want to use pkgconfig.
64 if (int(os.environ.get('GTK_FROM_PKGCONFIG', '1')) or
65 platform.architecture()[0]=='64bit'):
66 # Use pkg-config to use a local copy of gtk.
68 env.ParseConfig('pkg-config gtk+-2.0 --cflags --libs')
70 print 'libgtk2.0-dev is required.'
71 print 'Please run: sudo apt-get install libgtk2.0-dev'
75 # Set things up based on the layout of the bundled gtk.
77 LIBPATH = '$GTK_DIR/linux/lib',
80 '$GTK_DIR/include/gtk-2.0',
81 '$GTK_DIR/include/glib-2.0',
82 '$GTK_DIR/include/cairo',
83 '$GTK_DIR/include/pango-1.0',
84 '$GTK_DIR/include/atk-1.0',
85 '$GTK_DIR/lib/glib-2.0/include',
86 '$GTK_DIR/lib/gtk-2.0/include',
99 ['TARGET_API_MAC_CARBON', '1'],
101 'USE_SYSTEM_CONSOLE',
106 if env.Bit('windows'):
112 'XP_WIN', 'WIN32', '_WINDOWS'
115 env.Tool('atlmfc_vc80')
118 nonnacl_util_inputs = [
119 'sel_ldr_launcher.cc',
122 if env.Bit('windows'):
123 nonnacl_util_inputs += [
124 'win/sel_ldr_launcher_win.cc',
126 elif env.Bit('linux'):
127 nonnacl_util_inputs += [
128 'linux/sel_ldr_launcher_linux.cc',
129 'linux/get_plugin_dirname.cc',
135 nonnacl_util_inputs += [
136 'linux/sel_ldr_launcher_linux.cc',
137 'osx/get_plugin_dirname.mm',
140 nonnacl_util_inputs = env.ComponentObject(nonnacl_util_inputs)
142 nonnacl_util_c_inputs = nonnacl_util_inputs + [ 'sel_ldr_launcher_c.cc' ]
144 env.ComponentLibrary('nonnacl_util', nonnacl_util_inputs)
145 env.ComponentLibrary('nonnacl_util_c', nonnacl_util_c_inputs)
148 env.ComponentProgram('sel_mon', sel_mon_inputs)