blob: 378d9a089e74a9cfc4def9c10b9ac2aee690f774 [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 ],
34 'conditions': [
35 # For each platform, run configure and scrape the generated MHD_config.h
36 # to get a list of platform specific defines
37 # the options to use for configure are:
38 # --disable-doc --disable-exapmles --enable-https=no --disable-curl
39 # --enable-spdy=no --enable-shared=no
40 ['skia_os == "linux"', {
41 'cflags': [ '-w' ],
42 'libraries': [
43 '-lpthread',
44 ],
45 'direct_dependent_settings': {
46 'libraries': [ '-lpthread' ],
47 },
48 'defines=': [ # equals sign throws away most Skia defines (just noise)
49 "_GNU_SOURCE=1",
50 "BAUTH_SUPPORT=1",
51 "DAUTH_SUPPORT=1",
52 "EPOLL_SUPPORT=1",
53 "HAVE_ACCEPT4=1",
54 "HAVE_ARPA_INET_H=1",
55 "HAVE_CLOCK_GETTIME=1",
56 "HAVE_DECL_SOCK_NONBLOCK=1",
57 "HAVE_DECL_TCP_CORK=1",
58 "HAVE_DECL_TCP_NOPUSH=0",
59 "HAVE_DLFCN_H=1",
60 "HAVE_EPOLL_CREATE1=1",
61 "HAVE_ERRNO_H=1",
62 "HAVE_FCNTL_H=1",
63 "HAVE_FSEEKO=1",
64 "HAVE_GCRYPT_H=1",
65 "HAVE_INET6=1",
66 "HAVE_INTTYPES_H=1",
67 "HAVE_LIMITS_H=1",
68 "HAVE_LISTEN_SHUTDOWN=1",
69 "HAVE_LOCALE_H=1",
70 "HAVE_MATH_H=1",
71 "HAVE_MEMMEM=1",
72 "HAVE_MEMORY_H=1",
73 "HAVE_MESSAGES=1",
74 "HAVE_NETDB_H=1",
75 "HAVE_NETINET_IN_H=1",
76 "HAVE_NETINET_TCP_H=1",
77 "HAVE_POLL=1",
78 "HAVE_POLL_H=1",
79 "HAVE_POSTPROCESSOR=1",
80 "HAVE_PTHREAD_H=1",
81 "HAVE_PTHREAD_PRIO_INHERIT=1",
82 "HAVE_PTHREAD_SETNAME_NP=1",
83 "HAVE_SEARCH_H=1",
84 "HAVE_SOCK_NONBLOCK=1",
85 "HAVE_STDINT_H=1",
86 "HAVE_STDIO_H=1",
87 "HAVE_STDLIB_H=1",
88 "HAVE_STRINGS_H=1",
89 "HAVE_STRING_H=1",
90 "HAVE_SYS_MMAN_H=1",
91 "HAVE_SYS_MSG_H=1",
92 "HAVE_SYS_SELECT_H=1",
93 "HAVE_SYS_SOCKET_H=1",
94 "HAVE_SYS_STAT_H=1",
95 "HAVE_SYS_TIME_H=1",
96 "HAVE_SYS_TYPES_H=1",
97 "HAVE_TIME_H=1",
98 "HAVE_UNISTD_H=1",
99 "HTTPS_SUPPORT=0",
100 "LINUX=1",
101 'LT_OBJDIR=".libs/"',
102 "MHD_USE_POSIX_THREADS=1",
103 'PACKAGE="libmicrohttpd"',
104 'PACKAGE_BUGREPORT="libmicrohttpd@gnu.org"',
105 'PACKAGE_NAME="libmicrohttp"',
106 'PACKAGE_STRING="libmicrohttpd 0.9.42"',
107 'PACKAGE_TARNAME="libmicrohttpd"',
108 'PACKAGE_URL=""',
109 'PACKAGE_VERSION="0.9.42"',
110 "SPDY_SUPPORT=0",
111 "STDC_HEADERS=1",
112 'VERSION="0.9.42"',
113 '_MHD_EXTERN=__attribute__((visibility("default"))) extern',
114 ],
115 }],
116 ['skia_os == "mac"', {
117 'cflags': [ '-w' ],
118 'libraries': [
119 '-lpthread',
120 ],
121 'defines=': [ # equals sign throws away most Skia defines (just noise)
122 "_GNU_SOURCE=1",
123 "BAUTH_SUPPORT=1",
124 "DAUTH_SUPPORT=1",
125 "EPOLL_SUPPORT=0",
126 "HAVE_ARPA_INET_H=1",
127 "HAVE_CLOCK_GETTIME=1",
128 "HAVE_DECL_SOCK_NONBLOCK=0",
129 "HAVE_DECL_TCP_CORK=0",
130 "HAVE_DECL_TCP_NOPUSH=1",
131 "HAVE_DLFCN_H=1",
132 "HAVE_ERRNO_H=1",
133 "HAVE_FCNTL_H=1",
134 "HAVE_FSEEKO=1",
135 "HAVE_INET6=1",
136 "HAVE_INTTYPES_H=1",
137 "HAVE_LIMITS_H=1",
138 "HAVE_LOCALE_H=1",
139 "HAVE_MATH_H=1",
140 "HAVE_MEMMEM=1",
141 "HAVE_MEMORY_H=1",
142 "HAVE_MESSAGES=1",
143 "HAVE_NETDB_H=1",
144 "HAVE_NETINET_IN_H=1",
145 "HAVE_NETINET_TCP_H=1",
146 "HAVE_POLL=1",
147 "HAVE_POLL_H=1",
148 "HAVE_POSTPROCESSOR=1",
149 "HAVE_PTHREAD_H=1",
150 "HAVE_PTHREAD_PRIO_INHERIT=1",
151 "HAVE_SEARCH_H=1",
152 "HAVE_STDINT_H=1",
153 "HAVE_STDIO_H=1",
154 "HAVE_STDLIB_H=1",
155 "HAVE_STRINGS_H=1",
156 "HAVE_STRING_H=1",
157 "HAVE_SYS_MMAN_H=1",
158 "HAVE_SYS_MSG_H=1",
159 "HAVE_SYS_SELECT_H=1",
160 "HAVE_SYS_SOCKET_H=1",
161 "HAVE_SYS_STAT_H=1",
162 "HAVE_SYS_TIME_H=1",
163 "HAVE_SYS_TYPES_H=1",
164 "HAVE_TIME_H=1",
165 "HAVE_UNISTD_H=1",
166 "HTTPS_SUPPORT=0",
167 "OSX=1",
168 'LT_OBJDIR=".libs/"',
169 "MHD_USE_POSIX_THREADS=1",
170 'PACKAGE="libmicrohttpd"',
171 'PACKAGE_BUGREPORT="libmicrohttpd@gnu.org"',
172 'PACKAGE_NAME="libmicrohttp"',
173 'PACKAGE_STRING="libmicrohttpd 0.9.42"',
174 'PACKAGE_TARNAME="libmicrohttpd"',
175 'PACKAGE_URL=""',
176 'PACKAGE_VERSION="0.9.42"',
177 "SPDY_SUPPORT=0",
178 "STDC_HEADERS=1",
179 'VERSION="0.9.42"',
180 '_MHD_EXTERN=__attribute__((visibility("default"))) extern',
181 ],
182 }],
brianosman82996b82016-04-20 10:52:54 -0700183 ['skia_os == "win"', {
184 'sources': [
185 '../third_party/externals/microhttpd/src/platform/w32functions.c',
186 ],
187 'msvs_disabled_warnings': [4244, 4996],
188 'all_dependent_settings': {
189 'msvs_settings': {
190 'VCLinkerTool': {
191 'AdditionalDependencies': [ 'ws2_32.lib' ],
192 },
193 },
194 },
195 'defines=': [ # equals sign throws away most Skia defines (just noise)
196 "_GNU_SOURCE=1",
197 "BAUTH_SUPPORT=1",
198 "DAUTH_SUPPORT=1",
199 "EPOLL_SUPPORT=0",
200 "HAVE_DECL_SOCK_NONBLOCK=0",
201 "HAVE_DECL_TCP_CORK=0",
202 "HAVE_DECL_TCP_NOPUSH=0",
203 "HAVE_ERRNO_H=1",
204 "HAVE_FCNTL_H=1",
205 "HAVE_INET6=1",
206 "HAVE_INTTYPES_H=1",
207 "HAVE_LIMITS_H=1",
208 "HAVE_LOCALE_H=1",
209 "HAVE_MATH_H=1",
210 "HAVE_MEMORY_H=1",
211 "HAVE_MESSAGES=1",
212# "HAVE_POLL=0",
213 "HAVE_POSTPROCESSOR=1",
214 "HAVE_PTHREAD_H=0",
215 "HAVE_STDINT_H=1",
216 "HAVE_STDIO_H=1",
217 "HAVE_STDLIB_H=1",
218 "HAVE_STRINGS_H=1",
219 "HAVE_STRING_H=1",
220 "HAVE_SYS_STAT_H=1",
221 "HAVE_SYS_TYPES_H=1",
222 "HAVE_TIME_H=1",
223 "HAVE_WINSOCK2_H=1",
224 "HAVE_WS2TCPIP_H=1",
225 "HTTPS_SUPPORT=0",
226 "MSVC=1",
227 "WINDOWS=1",
228 'LT_OBJDIR=".libs/"',
229 "MHD_DONT_USE_PIPES=1",
230 "MHD_USE_W32_THREADS=1",
231 'PACKAGE="libmicrohttpd"',
232 'PACKAGE_BUGREPORT="libmicrohttpd@gnu.org"',
233 'PACKAGE_NAME="libmicrohttp"',
234 'PACKAGE_STRING="libmicrohttpd 0.9.42"',
235 'PACKAGE_TARNAME="libmicrohttpd"',
236 'PACKAGE_URL=""',
237 'PACKAGE_VERSION="0.9.42"',
238 "SPDY_SUPPORT=0",
239 "STDC_HEADERS=1",
240 'VERSION="0.9.42"',
241 '_MHD_EXTERN=extern',
242 ],
243 }],
joshualitt5ec91322016-03-09 15:07:01 -0800244 ]
245 }]
joshualitt8cc3f4e2016-01-25 10:50:04 -0800246}