Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / src / untrusted / nacl / nacl.gyp
1 # Copyright (c) 2011 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 {
6   'includes': [
7     '../../../build/common.gypi',
8   ],
9   'variables': {
10     'sources_for_standard_interfaces': [
11       'abort.c',
12       'access.c',
13       'chdir.c',
14       'chmod.c',
15       'clock.c',
16       'clock_getres.c',
17       'clock_gettime.c',
18       'close.c',
19       'dup.c',
20       '_exit.c',
21       'eaccess.c',
22       'fchdir.c',
23       'fchmod.c',
24       'fdatasync.c',
25       'fstat.c',
26       'fsync.c',
27       'ftruncate.c',
28       'getcwd.c',
29       'getdents.c',
30       'gethostname.c',
31       'getpagesize.c',
32       'getpid.c',
33       'gettimeofday.c',
34       'htonl.c',
35       'htons.c',
36       'isatty.c',
37       'link.c',
38       'lock.c',
39       'lseek.c',
40       'lstat.c',
41       'malloc.c',
42       'mkdir.c',
43       'mmap.c',
44       'mprotect.c',
45       'munmap.c',
46       'nanosleep.c',
47       'nacl_ext_supply.c',
48       'nacl_interface_query.c',
49       'nacl_irt_fdio.c',
50       'nacl_irt_filename.c',
51       'nacl_read_tp.c',
52       'nacl_add_tp.c',
53       'ntohl.c',
54       'ntohs.c',
55       'open.c',
56       'read.c',
57       'readlink.c',
58       'rename.c',
59       'rmdir.c',
60       'pthread_initialize_minimal.c',
61       'pthread_stubs.c',
62       'sbrk.c',
63       'sched_yield.c',
64       'sigblock.c',
65       'siggetmask.c',
66       'sigmask.c',
67       'sigprocmask.c',
68       'sigsetmask.c',
69       'stacktrace.c',
70       'start.c',
71       'stat.c',
72       'symlink.c',
73       'sysconf.c',
74       'tls.c',
75       'truncate.c',
76       'unlink.c',
77       'utimes.c',
78       'write.c',
79     ],
80     'sources_for_stubs': [
81       'stubs/_execve.c',
82       'stubs/accept.c',
83       'stubs/addmntent.c',
84       'stubs/bind.c',
85       'stubs/chown.c',
86       'stubs/closelog.c',
87       'stubs/connect.c',
88       'stubs/endgrent.c',
89       'stubs/endmntent.c',
90       'stubs/endpwent.c',
91       'stubs/environ.c',
92       'stubs/execvpe.c',
93       'stubs/fchown.c',
94       'stubs/fcntl.c',
95       'stubs/fork.c',
96       'stubs/freeaddrinfo.c',
97       'stubs/fstatvfs.c',
98       'stubs/gai_strerror.c',
99       'stubs/get_current_dir_name.c',
100       'stubs/getaddrinfo.c',
101       'stubs/getdtablesize.c',
102       'stubs/getegid.c',
103       'stubs/geteuid.c',
104       'stubs/getgid.c',
105       'stubs/getgrent.c',
106       'stubs/getgrgid.c',
107       'stubs/getgrgid_r.c',
108       'stubs/getgrnam.c',
109       'stubs/getgroups.c',
110       'stubs/gethostbyaddr.c',
111       'stubs/gethostbyname.c',
112       'stubs/getlogin.c',
113       'stubs/getmntent.c',
114       'stubs/getnameinfo.c',
115       'stubs/getpeername.c',
116       'stubs/getpgrp.c',
117       'stubs/getppid.c',
118       'stubs/getpwent.c',
119       'stubs/getpwnam.c',
120       'stubs/getpwnam_r.c',
121       'stubs/getpwuid.c',
122       'stubs/getpwuid_r.c',
123       'stubs/getrlimit.c',
124       'stubs/getrusage.c',
125       'stubs/getservbyport.c',
126       'stubs/getsockname.c',
127       'stubs/getsockopt.c',
128       'stubs/getuid.c',
129       'stubs/getwd.c',
130       'stubs/hasmntopt.c',
131       'stubs/if_freenameindex.c',
132       'stubs/if_indextoname.c',
133       'stubs/if_nameindex.c',
134       'stubs/if_nametoindex.c',
135       'stubs/inet_ntoa.c',
136       'stubs/inet_ntop.c',
137       'stubs/initgroups.c',
138       'stubs/ioctl.c',
139       'stubs/issetugid.c',
140       'stubs/kill.c',
141       'stubs/lchown.c',
142       'stubs/listen.c',
143       'stubs/llseek.c',
144       'stubs/major.c',
145       'stubs/makedev.c',
146       'stubs/minor.c',
147       'stubs/mkfifo.c',
148       'stubs/mknod.c',
149       'stubs/msync.c',
150       'stubs/openlog.c',
151       'stubs/pipe.c',
152       'stubs/poll.c',
153       'stubs/pselect.c',
154       'stubs/pthread_sigmask.c',
155       'stubs/readv.c',
156       'stubs/recv.c',
157       'stubs/recvfrom.c',
158       'stubs/recvmsg.c',
159       'stubs/sched_get_priority_max.c',
160       'stubs/sched_get_priority_min.c',
161       'stubs/sched_setparam.c',
162       'stubs/sched_setscheduler.c',
163       'stubs/select.c',
164       'stubs/send.c',
165       'stubs/sendmsg.c',
166       'stubs/sendto.c',
167       'stubs/setegid.c',
168       'stubs/seteuid.c',
169       'stubs/setgid.c',
170       'stubs/setgrent.c',
171       'stubs/setgroups.c',
172       'stubs/setmntent.c',
173       'stubs/setpgid.c',
174       'stubs/setpwent.c',
175       'stubs/setrlimit.c',
176       'stubs/setsid.c',
177       'stubs/setsockopt.c',
178       'stubs/settimeofday.c',
179       'stubs/setuid.c',
180       'stubs/shutdown.c',
181       'stubs/sigaction.c',
182       'stubs/signal.c',
183       'stubs/sigsuspend.c',
184       'stubs/sigvec.c',
185       'stubs/socket.c',
186       'stubs/socketpair.c',
187       'stubs/statvfs.c',
188       'stubs/syslog.c',
189       'stubs/tcdrain.c',
190       'stubs/tcflow.c',
191       'stubs/tcflush.c',
192       'stubs/tcgetattr.c',
193       'stubs/tcsendbreak.c',
194       'stubs/tcsetattr.c',
195       'stubs/times.c',
196       'stubs/ttyname.c',
197       'stubs/ttyname_r.c',
198       'stubs/umask.c',
199       'stubs/utime.c',
200       'stubs/vfork.c',
201       'stubs/wait.c',
202       'stubs/waitpid.c',
203     ],
204     'sources_for_nacl_extensions': [
205       'gc_hooks.c',
206       'nacl_irt.c',
207       'nacl_irt_init.c',
208       'nacl_tls_get.c',
209       'nacl_tls_init.c',
210       'random.c',
211     ],
212     'imc_syscalls': [
213       'imc_accept.c',
214       'imc_connect.c',
215       'imc_makeboundsock.c',
216       'imc_mem_obj_create.c',
217       'imc_recvmsg.c',
218       'imc_sendmsg.c',
219       'imc_socketpair.c',
220       'nameservice.c',
221     ],
222   },
223
224   'targets' : [
225     {
226       'target_name': 'nacl_lib',
227       'type': 'none',
228       'dependencies': [
229         'nacl_lib_newlib',
230       ],
231       'conditions': [
232         # NOTE: We do not support glibc on arm and mips yet.
233         ['target_arch!="arm" and target_arch!="mipsel"', {
234            'dependencies': [
235              'nacl_lib_glibc'
236            ]
237          }],
238       ],
239     },
240
241     {
242       'target_name': 'nacl_lib_glibc',
243       'type': 'none',
244       'variables': {
245         'nlib_target': 'libnacl.a',
246         'build_glibc': 1,
247         'build_newlib': 0,
248       },
249       'sources': ['<@(sources_for_nacl_extensions)'],
250       'dependencies': [
251         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
252       ],
253     },
254     {
255       'target_name': 'nacl_lib_newlib',
256       'type': 'none',
257       'variables': {
258         'nlib_target': 'libnacl.a',
259         'build_glibc': 0,
260         'build_newlib': 1,
261         'build_irt': 1,
262         'build_pnacl_newlib': 1,
263         'build_nonsfi_helper': 1,
264       },
265       'sources': [
266         '<@(sources_for_nacl_extensions)',
267         '<@(sources_for_standard_interfaces)',
268         '<@(sources_for_stubs)',
269       ],
270       'conditions': [
271         ['target_arch=="arm"', {
272           'variables': {
273             'native_sources': [
274               'aeabi_read_tp.S'
275             ]
276           }
277         }],
278       ],
279       'dependencies': [
280         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
281       ],
282     },
283     {
284       'target_name': 'nacl_dynacode_lib',
285       'type': 'none',
286       'variables': {
287         'nlib_target': 'libnacl_dyncode.a',
288         'nso_target': 'libnacl_dyncode.so',
289         'build_glibc': 1,
290         'build_newlib': 1,
291         'build_pnacl_newlib': 1,
292       },
293       'sources': ['dyncode.c'],
294       'dependencies': [
295         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
296       ],
297     },
298     {
299       'target_name': 'nacl_dyncode_private_lib',
300       'type': 'none',
301       'variables': {
302         'nlib_target': 'libnacl_dyncode_private.a',
303         'build_glibc': 0,
304         'build_newlib': 1,
305         'build_pnacl_newlib': 1,
306       },
307       'sources': ['dyncode_private.c'],
308       'dependencies': [
309         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
310       ],
311     },
312     {
313       'target_name': 'nacl_exception_lib',
314       'type': 'none',
315       'variables': {
316         'nlib_target': 'libnacl_exception.a',
317         'nso_target': 'libnacl_exception.so',
318         'build_glibc': 1,
319         'build_newlib': 1,
320         'build_pnacl_newlib': 1,
321       },
322       'sources': ['nacl_exception.c'],
323       'dependencies': [
324         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
325       ],
326     },
327     {
328       'target_name': 'nacl_exception_private_lib',
329       'type': 'none',
330       'variables': {
331         'nlib_target': 'libnacl_exception_private.a',
332         'build_glibc': 1,
333         'build_newlib': 1,
334         'build_pnacl_newlib': 1,
335       },
336       'sources': ['nacl_exception_private.c'],
337       'dependencies': [
338         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
339       ],
340     },
341     {
342       'target_name': 'nacl_list_mappings_lib',
343       'type': 'none',
344       'variables': {
345         'nlib_target': 'libnacl_list_mappings.a',
346         'nso_target': 'libnacl_list_mappings.so',
347         'build_glibc': 1,
348         'build_newlib': 1,
349         'build_pnacl_newlib': 1,
350       },
351       'sources': ['list_mappings.c'],
352       'dependencies': [
353         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
354       ],
355     },
356     {
357       'target_name': 'nacl_list_mappings_private_lib',
358       'type': 'none',
359       'variables': {
360         'nlib_target': 'libnacl_list_mappings_private.a',
361         'build_glibc': 0,
362         'build_newlib': 1,
363       },
364       'sources': ['list_mappings_private.c'],
365       'dependencies': [
366         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
367       ],
368     },
369     {
370       'target_name': 'imc_syscalls_lib',
371       'type': 'none',
372       'variables': {
373         'nlib_target': 'libimc_syscalls.a',
374         'nso_target': 'libimc_syscalls.so',
375         'build_glibc': 1,
376         'build_newlib': 1,
377         'build_pnacl_newlib': 1,
378         'build_irt': 1,
379       },
380       'sources': ['<@(imc_syscalls)'],
381       'dependencies': [
382         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
383       ],
384     },
385   ],
386 }