blob: c7f72878e95dcf1928e37f870c422cb40869dddd [file] [log] [blame]
murgatroid992d6d3302015-09-21 13:29:40 -07001%YAML 1.2
2--- |
3 # GRPC gyp file
murgatroid99ca9db402015-09-21 14:39:09 -07004 # This currently builds C code.
murgatroid992d6d3302015-09-21 13:29:40 -07005 # This file has been automatically generated from a template file.
6 # Please look at the templates directory instead.
7 # This file can be regenerated from the template by running
8 # tools/buildgen/generate_projects.sh
9
10 # Copyright 2015, Google Inc.
11 # All rights reserved.
12 #
13 # Redistribution and use in source and binary forms, with or without
14 # modification, are permitted provided that the following conditions are
15 # met:
16 #
17 # * Redistributions of source code must retain the above copyright
18 # notice, this list of conditions and the following disclaimer.
19 # * Redistributions in binary form must reproduce the above
20 # copyright notice, this list of conditions and the following disclaimer
21 # in the documentation and/or other materials provided with the
22 # distribution.
23 # * Neither the name of Google Inc. nor the names of its
24 # contributors may be used to endorse or promote products derived from
25 # this software without specific prior written permission.
26 #
27 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
39 # Some of this file is built with the help of
40 # https://n8.io/converting-a-c-library-to-gyp/
41 {
42 'target_defaults': {
43 'default_configuration': 'Debug',
44 'configurations': {
45 'Debug': {
46 'defines': [ 'DEBUG', '_DEBUG' ],
47 'msvs_settings': {
48 'VCCLCompilerTool': {
49 'RuntimeLibrary': 1, # static debug
50 },
51 },
52 },
53 'Release': {
54 'defines': [ 'NDEBUG' ],
55 'msvs_settings': {
56 'VCCLCompilerTool': {
57 'RuntimeLibrary': 0, # static release
58 },
59 },
60 }
61 },
62 'msvs_settings': {
63 'VCLinkerTool': {
64 'GenerateDebugInformation': 'true',
65 },
66 },
murgatroid99ca9db402015-09-21 14:39:09 -070067 'defines': [
68 # TODO: Properly check for ALPN support
69 'TSI_OPENSSL_ALPN_SUPPORT=0'
70 ],
murgatroid992d6d3302015-09-21 13:29:40 -070071 'include_dirs': [
murgatroid99ca9db402015-09-21 14:39:09 -070072 '.',
murgatroid992d6d3302015-09-21 13:29:40 -070073 'include'
74 ],
75 'libraries': [
76 '-lcrypto',
77 '-lssl',
78 '-ldl',
79 '-lpthread',
murgatroid99ca9db402015-09-21 14:39:09 -070080 '-lz'
murgatroid992d6d3302015-09-21 13:29:40 -070081 ]
82 },
83 'targets': [
84 % for lib in libs:
murgatroid99ca9db402015-09-21 14:39:09 -070085 % if lib.language == 'c':
murgatroid992d6d3302015-09-21 13:29:40 -070086 {
87 'target_name': '${lib.name}',
88 'product_prefix': 'lib',
89 'type': 'static_library',
90 'dependencies': [
91 % for dep in getattr(lib, 'deps', []):
92 '${dep}',
93 % endfor
94 ],
95 'sources': [
96 % for source in lib.src:
murgatroid99ca9db402015-09-21 14:39:09 -070097 '${source}',
murgatroid992d6d3302015-09-21 13:29:40 -070098 % endfor
murgatroid99ca9db402015-09-21 14:39:09 -070099 ],
murgatroid992d6d3302015-09-21 13:29:40 -0700100 },
murgatroid99ca9db402015-09-21 14:39:09 -0700101 % endif
murgatroid992d6d3302015-09-21 13:29:40 -0700102 % endfor
103 % for tgt in targets:
murgatroid99ca9db402015-09-21 14:39:09 -0700104 % if tgt.language == 'c':
murgatroid992d6d3302015-09-21 13:29:40 -0700105 {
106 'target_name': '${tgt.name}',
107 'type': 'executable',
108 'dependencies': [
109 % for dep in getattr(tgt, 'deps', []):
110 '${dep}',
111 % endfor
112 ],
113 'sources': [
114 % for source in tgt.src:
115 '${source}',
116 % endfor
117 ]
118 },
murgatroid99ca9db402015-09-21 14:39:09 -0700119 % endif
murgatroid992d6d3302015-09-21 13:29:40 -0700120 % endfor
121 ]
122 }