blob: 3590cc192231d3c2df7da7aba7a15b810306780b [file] [log] [blame]
joshualitt8cc3f4e2016-01-25 10:50:04 -08001# Copyright 2016 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
joshualitt8cc3f4e2016-01-25 10:50:04 -08005{
joshualitt5ec91322016-03-09 15:07:01 -08006 'variables': {
7 'skia_warnings_as_errors': 0,
8 },
9 'targets': [{
10 'target_name': 'microhttpd',
11 'type': 'static_library',
12
13 'direct_dependent_settings': {
14 'include_dirs': [ '../third_party/externals/microhttpd/src/include' ]
joshualitt8cc3f4e2016-01-25 10:50:04 -080015 },
joshualitt5ec91322016-03-09 15:07:01 -080016 'include_dirs': [
17 '../third_party/externals/microhttpd/src/include',
18 '../third_party/libmicrohttpd',
19 ],
20 'sources': [
21 '../third_party/externals/microhttpd/src/microhttpd/base64.c',
22 '../third_party/externals/microhttpd/src/microhttpd/basicauth.c',
23 '../third_party/externals/microhttpd/src/microhttpd/connection.c',
24 '../third_party/externals/microhttpd/src/microhttpd/daemon.c',
25 '../third_party/externals/microhttpd/src/microhttpd/digestauth.c',
26 '../third_party/externals/microhttpd/src/microhttpd/internal.c',
27 '../third_party/externals/microhttpd/src/microhttpd/md5.c',
28 '../third_party/externals/microhttpd/src/microhttpd/memorypool.c',
29 '../third_party/externals/microhttpd/src/microhttpd/postprocessor.c',
30 '../third_party/externals/microhttpd/src/microhttpd/reason_phrase.c',
31 '../third_party/externals/microhttpd/src/microhttpd/response.c',
32 '../third_party/externals/microhttpd/src/microhttpd/tsearch.c',
33 ],
halcanarye76ca8b2016-05-20 10:36:50 -070034 'variables': {
35 'skia_microhttpd_flags' : [
36 '-Wno-sign-compare',
37 '-Wno-unused-const-variable',
38 '-Wno-tautological-constant-out-of-range-compare',
39 ],
40 },
41 'cflags': [ '<@(skia_microhttpd_flags)' ],
42 'xcode_settings': { 'WARNING_CFLAGS': [ '<@(skia_microhttpd_flags)' ], },
joshualitt5ec91322016-03-09 15:07:01 -080043 'conditions': [
44 # For each platform, run configure and scrape the generated MHD_config.h
45 # to get a list of platform specific defines
46 # the options to use for configure are:
47 # --disable-doc --disable-exapmles --enable-https=no --disable-curl
48 # --enable-spdy=no --enable-shared=no
49 ['skia_os == "linux"', {
50 'cflags': [ '-w' ],
51 'libraries': [
52 '-lpthread',
53 ],
54 'direct_dependent_settings': {
55 'libraries': [ '-lpthread' ],
56 },
57 'defines=': [ # equals sign throws away most Skia defines (just noise)
58 "_GNU_SOURCE=1",
59 "BAUTH_SUPPORT=1",
60 "DAUTH_SUPPORT=1",
61 "EPOLL_SUPPORT=1",
62 "HAVE_ACCEPT4=1",
63 "HAVE_ARPA_INET_H=1",
64 "HAVE_CLOCK_GETTIME=1",
65 "HAVE_DECL_SOCK_NONBLOCK=1",
66 "HAVE_DECL_TCP_CORK=1",
67 "HAVE_DECL_TCP_NOPUSH=0",
68 "HAVE_DLFCN_H=1",
69 "HAVE_EPOLL_CREATE1=1",
70 "HAVE_ERRNO_H=1",
71 "HAVE_FCNTL_H=1",
72 "HAVE_FSEEKO=1",
73 "HAVE_GCRYPT_H=1",
74 "HAVE_INET6=1",
75 "HAVE_INTTYPES_H=1",
76 "HAVE_LIMITS_H=1",
77 "HAVE_LISTEN_SHUTDOWN=1",
78 "HAVE_LOCALE_H=1",
79 "HAVE_MATH_H=1",
80 "HAVE_MEMMEM=1",
81 "HAVE_MEMORY_H=1",
82 "HAVE_MESSAGES=1",
83 "HAVE_NETDB_H=1",
84 "HAVE_NETINET_IN_H=1",
85 "HAVE_NETINET_TCP_H=1",
86 "HAVE_POLL=1",
87 "HAVE_POLL_H=1",
88 "HAVE_POSTPROCESSOR=1",
89 "HAVE_PTHREAD_H=1",
90 "HAVE_PTHREAD_PRIO_INHERIT=1",
91 "HAVE_PTHREAD_SETNAME_NP=1",
92 "HAVE_SEARCH_H=1",
93 "HAVE_SOCK_NONBLOCK=1",
94 "HAVE_STDINT_H=1",
95 "HAVE_STDIO_H=1",
96 "HAVE_STDLIB_H=1",
97 "HAVE_STRINGS_H=1",
98 "HAVE_STRING_H=1",
99 "HAVE_SYS_MMAN_H=1",
100 "HAVE_SYS_MSG_H=1",
101 "HAVE_SYS_SELECT_H=1",
102 "HAVE_SYS_SOCKET_H=1",
103 "HAVE_SYS_STAT_H=1",
104 "HAVE_SYS_TIME_H=1",
105 "HAVE_SYS_TYPES_H=1",
106 "HAVE_TIME_H=1",
107 "HAVE_UNISTD_H=1",
108 "HTTPS_SUPPORT=0",
109 "LINUX=1",
110 'LT_OBJDIR=".libs/"',
111 "MHD_USE_POSIX_THREADS=1",
112 'PACKAGE="libmicrohttpd"',
113 'PACKAGE_BUGREPORT="libmicrohttpd@gnu.org"',
114 'PACKAGE_NAME="libmicrohttp"',
115 'PACKAGE_STRING="libmicrohttpd 0.9.42"',
116 'PACKAGE_TARNAME="libmicrohttpd"',
117 'PACKAGE_URL=""',
118 'PACKAGE_VERSION="0.9.42"',
119 "SPDY_SUPPORT=0",
120 "STDC_HEADERS=1",
121 'VERSION="0.9.42"',
122 '_MHD_EXTERN=__attribute__((visibility("default"))) extern',
123 ],
124 }],
125 ['skia_os == "mac"', {
126 'cflags': [ '-w' ],
127 'libraries': [
128 '-lpthread',
129 ],
130 'defines=': [ # equals sign throws away most Skia defines (just noise)
131 "_GNU_SOURCE=1",
132 "BAUTH_SUPPORT=1",
133 "DAUTH_SUPPORT=1",
134 "EPOLL_SUPPORT=0",
135 "HAVE_ARPA_INET_H=1",
136 "HAVE_CLOCK_GETTIME=1",
137 "HAVE_DECL_SOCK_NONBLOCK=0",
138 "HAVE_DECL_TCP_CORK=0",
139 "HAVE_DECL_TCP_NOPUSH=1",
140 "HAVE_DLFCN_H=1",
141 "HAVE_ERRNO_H=1",
142 "HAVE_FCNTL_H=1",
143 "HAVE_FSEEKO=1",
144 "HAVE_INET6=1",
145 "HAVE_INTTYPES_H=1",
146 "HAVE_LIMITS_H=1",
147 "HAVE_LOCALE_H=1",
148 "HAVE_MATH_H=1",
149 "HAVE_MEMMEM=1",
150 "HAVE_MEMORY_H=1",
151 "HAVE_MESSAGES=1",
152 "HAVE_NETDB_H=1",
153 "HAVE_NETINET_IN_H=1",
154 "HAVE_NETINET_TCP_H=1",
155 "HAVE_POLL=1",
156 "HAVE_POLL_H=1",
157 "HAVE_POSTPROCESSOR=1",
158 "HAVE_PTHREAD_H=1",
159 "HAVE_PTHREAD_PRIO_INHERIT=1",
160 "HAVE_SEARCH_H=1",
161 "HAVE_STDINT_H=1",
162 "HAVE_STDIO_H=1",
163 "HAVE_STDLIB_H=1",
164 "HAVE_STRINGS_H=1",
165 "HAVE_STRING_H=1",
166 "HAVE_SYS_MMAN_H=1",
167 "HAVE_SYS_MSG_H=1",
168 "HAVE_SYS_SELECT_H=1",
169 "HAVE_SYS_SOCKET_H=1",
170 "HAVE_SYS_STAT_H=1",
171 "HAVE_SYS_TIME_H=1",
172 "HAVE_SYS_TYPES_H=1",
173 "HAVE_TIME_H=1",
174 "HAVE_UNISTD_H=1",
175 "HTTPS_SUPPORT=0",
176 "OSX=1",
177 'LT_OBJDIR=".libs/"',
178 "MHD_USE_POSIX_THREADS=1",
179 'PACKAGE="libmicrohttpd"',
180 'PACKAGE_BUGREPORT="libmicrohttpd@gnu.org"',
181 'PACKAGE_NAME="libmicrohttp"',
182 'PACKAGE_STRING="libmicrohttpd 0.9.42"',
183 'PACKAGE_TARNAME="libmicrohttpd"',
184 'PACKAGE_URL=""',
185 'PACKAGE_VERSION="0.9.42"',
186 "SPDY_SUPPORT=0",
187 "STDC_HEADERS=1",
188 'VERSION="0.9.42"',
189 '_MHD_EXTERN=__attribute__((visibility("default"))) extern',
190 ],
191 }],
brianosman82996b82016-04-20 10:52:54 -0700192 ['skia_os == "win"', {
193 'sources': [
194 '../third_party/externals/microhttpd/src/platform/w32functions.c',
195 ],
196 'msvs_disabled_warnings': [4244, 4996],
197 'all_dependent_settings': {
198 'msvs_settings': {
199 'VCLinkerTool': {
200 'AdditionalDependencies': [ 'ws2_32.lib' ],
201 },
202 },
203 },
204 'defines=': [ # equals sign throws away most Skia defines (just noise)
205 "_GNU_SOURCE=1",
206 "BAUTH_SUPPORT=1",
207 "DAUTH_SUPPORT=1",
208 "EPOLL_SUPPORT=0",
209 "HAVE_DECL_SOCK_NONBLOCK=0",
210 "HAVE_DECL_TCP_CORK=0",
211 "HAVE_DECL_TCP_NOPUSH=0",
212 "HAVE_ERRNO_H=1",
213 "HAVE_FCNTL_H=1",
214 "HAVE_INET6=1",
215 "HAVE_INTTYPES_H=1",
216 "HAVE_LIMITS_H=1",
217 "HAVE_LOCALE_H=1",
218 "HAVE_MATH_H=1",
219 "HAVE_MEMORY_H=1",
220 "HAVE_MESSAGES=1",
221# "HAVE_POLL=0",
222 "HAVE_POSTPROCESSOR=1",
223 "HAVE_PTHREAD_H=0",
224 "HAVE_STDINT_H=1",
225 "HAVE_STDIO_H=1",
226 "HAVE_STDLIB_H=1",
227 "HAVE_STRINGS_H=1",
228 "HAVE_STRING_H=1",
229 "HAVE_SYS_STAT_H=1",
230 "HAVE_SYS_TYPES_H=1",
231 "HAVE_TIME_H=1",
232 "HAVE_WINSOCK2_H=1",
233 "HAVE_WS2TCPIP_H=1",
234 "HTTPS_SUPPORT=0",
235 "MSVC=1",
236 "WINDOWS=1",
237 'LT_OBJDIR=".libs/"',
238 "MHD_DONT_USE_PIPES=1",
239 "MHD_USE_W32_THREADS=1",
240 'PACKAGE="libmicrohttpd"',
241 'PACKAGE_BUGREPORT="libmicrohttpd@gnu.org"',
242 'PACKAGE_NAME="libmicrohttp"',
243 'PACKAGE_STRING="libmicrohttpd 0.9.42"',
244 'PACKAGE_TARNAME="libmicrohttpd"',
245 'PACKAGE_URL=""',
246 'PACKAGE_VERSION="0.9.42"',
247 "SPDY_SUPPORT=0",
248 "STDC_HEADERS=1",
249 'VERSION="0.9.42"',
250 '_MHD_EXTERN=extern',
251 ],
252 }],
joshualitt5ec91322016-03-09 15:07:01 -0800253 ]
254 }]
joshualitt8cc3f4e2016-01-25 10:50:04 -0800255}