Use the installed Gtk (from pkg-config) by default
[nativeclient.git] / tools / libnacl / nacl.scons
blob99b1ef79c2d7173d589498d550d0b94530da5f13
1 # Copyright 2008, Google Inc.
2 # All rights reserved.
3
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7
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
13 # distribution.
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.
17
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.
31 Import('env')
33 # we have some empty source files
34 env.FilterOut(CCFLAGS=['-pedantic'])
36 # TODO: move this to common env
37 if env.Bit('host_windows'):
38   env.Replace(
39 # This is needed because Windows builds are case-insensitive.
40 # Without this we use nacl-as, which doesn't handle include directives, etc.
41     ASCOM = '$CCCOM',
42   )
43 else:
44   env.Replace(
45 # This is needed because Windows builds are case-insensitive.
46 # Without this we use nacl-as, which doesn't handle include directives, etc.
47     ASFLAGS = '$CCFLAGS',
48   )
50 sources = [
51     'close.c',
52     'dup.c',
53     'execve.c',
54     '_execve.c',
55     'fork.c',
56     'fstat.c',
57     'getdents.c',
58     'gettimeofday.c',
59     'imc_accept.c',
60     'imc_connect.c',
61     'imc_makeboundsock.c',
62     'imc_mem_obj_create.c',
63     'imc_recvmsg.c',
64     'imc_sendmsg.c',
65     'imc_socketpair.c',
66     'isatty.c',
67     'kill.c',
68     'link.c',
69     'lock.c',
70     'lseek.c',
71     'mmap.c',
72     'munmap.c',
73     'multimedia.c',
74     'open.c',
75     'pipe.c',
76     'read.c',
77     'sbrk.c',
78     'sched_yield.c',
79     'stacktrace.c',
80     'stat.c',
81     'sysconf.c',
82     'times.c',
83     'tls.c',
84     'unlink.c',
85     'wait.c',
86     'write.c',
87     # Assembly source files
88     'nacl_clock.S',
89     'nacl_close.S',
90     'nacl_exit.S',
91     'nacl_fstat.S',
92     'nacl_getdents.S',
93     'nacl_getpid.S',
94     'nacl_gettimeofday.S',
95     'nacl_imc_accept.S',
96     'nacl_imc_connect.S',
97     'nacl_imc_makeboundsock.S',
98     'nacl_imc_mem_obj_create.S',
99     'nacl_imc_recvmsg.S',
100     'nacl_imc_sendmsg.S',
101     'nacl_imc_socketpair.S',
102     'nacl_lseek.S',
103     'nacl_mmap.S',
104     'nacl_multimedia.S',
105     'nacl_null.S',
106     'nacl_open.S',
107     'nacl_read.S',
108     'nacl_sched_yield.S',
109     'nacl_srpc_get_fd.S',
110     'nacl_stat.S',
111     'nacl_sysbrk.S',
112     'nacl_sysconf.S',
113     'nacl_tls.S',
114     'nacl_unmap.S',
115     'nacl_write.S',
118 env.ComponentLibrary('libnacl', sources)
120 env.AddLibraryToSdk(['libnacl'])