summaryrefslogtreecommitdiff
path: root/chromium/native_client/src/shared/srpc/srpc.gyp
blob: d3cbda1ca19bbec87e3ba253365c0a79dcf18f46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright (c) 2008 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'includes': [
    '../../../build/common.gypi',
  ],
  'target_defaults': {
    'variables': {
      'target_base': 'none',
    },
    'target_conditions': [
      ['target_base=="srpc"', {
        'sources': [
          'invoke.c',
          'module_init_fini.c',
          'nacl_srpc.c',
          'nacl_srpc.h',
          'nacl_srpc_internal.h',
          'nacl_srpc_message.c',
          'rpc_log.c',
          'rpc_serialize.c',
          'rpc_service.c',
          'rpc_server_loop.c',
        ],
        'cflags': [
          '-fno-strict-aliasing',
          '-Wno-missing-field-initializers'
        ],
        # nacl_srpc_message.c contains an overflow check that produces an error
        # on 64-bit compiles when -Wextra is used:
        # 'comparison is always false due to limited range of data type'
        'cflags!': [
          '-Wextra'
        ],
      }],
    ],
  },
  'targets': [
    {
      'target_name': 'nonnacl_srpc',
      'type': 'static_library',
      'variables': {
        'target_base': 'srpc',
      },
    },
    {
      'target_name': 'srpc_lib',
      'type': 'none',
      'variables': {
        'nlib_target': 'libsrpc.a',
        'nso_target': 'libsrpc.so',
        'build_glibc': 1,
        'build_newlib': 1,
        'build_irt': 1,
        'sources': [
          'invoke.c',
          'module_init_fini.c',
          'nacl_srpc.c',
          'nacl_srpc_message.c',
          'rpc_log.c',
          'rpc_serialize.c',
          'rpc_service.c',
          'rpc_server_loop.c',
          'accept.c',
          'accept_threaded.c',
          'nacl_srpc_ppapi_plugin_init.c',
          'nacl_srpc_ppapi_plugin_internal.c'
        ],
      },
      'dependencies': [
        '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
      ],
    },
  ],
  'conditions': [
    ['OS=="win" and target_arch=="ia32"', {
      'targets': [
        {
          'target_name': 'nonnacl_srpc64',
          'type': 'static_library',
          'variables': {
            'target_base': 'srpc',
            'win_target': 'x64',
          },
        }
      ],
    }],
  ]
}