1# Copyright 2015 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. 5{ 6 'variables': { 7 'skia_warnings_as_errors': 0, 8 }, 9 'targets': [{ 10 # Draws pictures cross-process. 11 'target_name': 'nanomsg_picture_demo', 12 'type': 'executable', 13 'dependencies': [ 14 'skia_lib.gyp:skia_lib', 15 'flags.gyp:flags', 16 'libnanomsg', 17 ], 18 'sources': [ '../experimental/nanomsg/picture_demo.cpp' ], 19 },{ 20 'target_name': 'libnanomsg', 21 'type': 'static_library', 22 23 # Clients can include nanomsg public header foo.h with #include "nanomsg/src/foo.h" 24 'direct_dependent_settings': { 25 'include_dirs': [ '../third_party/externals' ] 26 }, 27 28 # To refresh: cd gyp; find ../third_party/externals/nanomsg/src -name "*.c" 29 'sources': [ 30 '../third_party/externals/nanomsg/src/aio/ctx.c', 31 '../third_party/externals/nanomsg/src/aio/fsm.c', 32 '../third_party/externals/nanomsg/src/aio/poller.c', 33 '../third_party/externals/nanomsg/src/aio/pool.c', 34 '../third_party/externals/nanomsg/src/aio/timer.c', 35 '../third_party/externals/nanomsg/src/aio/timerset.c', 36 '../third_party/externals/nanomsg/src/aio/usock.c', 37 '../third_party/externals/nanomsg/src/aio/worker.c', 38 '../third_party/externals/nanomsg/src/core/device.c', 39 '../third_party/externals/nanomsg/src/core/ep.c', 40 '../third_party/externals/nanomsg/src/core/epbase.c', 41 '../third_party/externals/nanomsg/src/core/global.c', 42 '../third_party/externals/nanomsg/src/core/pipe.c', 43 '../third_party/externals/nanomsg/src/core/poll.c', 44 '../third_party/externals/nanomsg/src/core/sock.c', 45 '../third_party/externals/nanomsg/src/core/sockbase.c', 46 '../third_party/externals/nanomsg/src/core/symbol.c', 47 '../third_party/externals/nanomsg/src/protocols/bus/bus.c', 48 '../third_party/externals/nanomsg/src/protocols/bus/xbus.c', 49 '../third_party/externals/nanomsg/src/protocols/pair/pair.c', 50 '../third_party/externals/nanomsg/src/protocols/pair/xpair.c', 51 '../third_party/externals/nanomsg/src/protocols/pipeline/pull.c', 52 '../third_party/externals/nanomsg/src/protocols/pipeline/push.c', 53 '../third_party/externals/nanomsg/src/protocols/pipeline/xpull.c', 54 '../third_party/externals/nanomsg/src/protocols/pipeline/xpush.c', 55 '../third_party/externals/nanomsg/src/protocols/pubsub/pub.c', 56 '../third_party/externals/nanomsg/src/protocols/pubsub/sub.c', 57 '../third_party/externals/nanomsg/src/protocols/pubsub/trie.c', 58 '../third_party/externals/nanomsg/src/protocols/pubsub/xpub.c', 59 '../third_party/externals/nanomsg/src/protocols/pubsub/xsub.c', 60 '../third_party/externals/nanomsg/src/protocols/reqrep/rep.c', 61 '../third_party/externals/nanomsg/src/protocols/reqrep/req.c', 62 '../third_party/externals/nanomsg/src/protocols/reqrep/xrep.c', 63 '../third_party/externals/nanomsg/src/protocols/reqrep/xreq.c', 64 '../third_party/externals/nanomsg/src/protocols/survey/respondent.c', 65 '../third_party/externals/nanomsg/src/protocols/survey/surveyor.c', 66 '../third_party/externals/nanomsg/src/protocols/survey/xrespondent.c', 67 '../third_party/externals/nanomsg/src/protocols/survey/xsurveyor.c', 68 '../third_party/externals/nanomsg/src/protocols/utils/dist.c', 69 '../third_party/externals/nanomsg/src/protocols/utils/excl.c', 70 '../third_party/externals/nanomsg/src/protocols/utils/fq.c', 71 '../third_party/externals/nanomsg/src/protocols/utils/lb.c', 72 '../third_party/externals/nanomsg/src/protocols/utils/priolist.c', 73 '../third_party/externals/nanomsg/src/transports/inproc/binproc.c', 74 '../third_party/externals/nanomsg/src/transports/inproc/cinproc.c', 75 '../third_party/externals/nanomsg/src/transports/inproc/inproc.c', 76 '../third_party/externals/nanomsg/src/transports/inproc/ins.c', 77 '../third_party/externals/nanomsg/src/transports/inproc/msgqueue.c', 78 '../third_party/externals/nanomsg/src/transports/inproc/sinproc.c', 79 '../third_party/externals/nanomsg/src/transports/ipc/aipc.c', 80 '../third_party/externals/nanomsg/src/transports/ipc/bipc.c', 81 '../third_party/externals/nanomsg/src/transports/ipc/cipc.c', 82 '../third_party/externals/nanomsg/src/transports/ipc/ipc.c', 83 '../third_party/externals/nanomsg/src/transports/ipc/sipc.c', 84 '../third_party/externals/nanomsg/src/transports/tcp/atcp.c', 85 '../third_party/externals/nanomsg/src/transports/tcp/btcp.c', 86 '../third_party/externals/nanomsg/src/transports/tcp/ctcp.c', 87 '../third_party/externals/nanomsg/src/transports/tcp/stcp.c', 88 '../third_party/externals/nanomsg/src/transports/tcp/tcp.c', 89 '../third_party/externals/nanomsg/src/transports/utils/backoff.c', 90 '../third_party/externals/nanomsg/src/transports/utils/dns.c', 91 '../third_party/externals/nanomsg/src/transports/utils/iface.c', 92 '../third_party/externals/nanomsg/src/transports/utils/literal.c', 93 '../third_party/externals/nanomsg/src/transports/utils/port.c', 94 '../third_party/externals/nanomsg/src/transports/utils/streamhdr.c', 95 '../third_party/externals/nanomsg/src/utils/alloc.c', 96 '../third_party/externals/nanomsg/src/utils/atomic.c', 97 '../third_party/externals/nanomsg/src/utils/chunk.c', 98 '../third_party/externals/nanomsg/src/utils/chunkref.c', 99 '../third_party/externals/nanomsg/src/utils/clock.c', 100 '../third_party/externals/nanomsg/src/utils/closefd.c', 101 '../third_party/externals/nanomsg/src/utils/efd.c', 102 '../third_party/externals/nanomsg/src/utils/err.c', 103 '../third_party/externals/nanomsg/src/utils/glock.c', 104 '../third_party/externals/nanomsg/src/utils/hash.c', 105 '../third_party/externals/nanomsg/src/utils/list.c', 106 '../third_party/externals/nanomsg/src/utils/msg.c', 107 '../third_party/externals/nanomsg/src/utils/mutex.c', 108 '../third_party/externals/nanomsg/src/utils/queue.c', 109 '../third_party/externals/nanomsg/src/utils/random.c', 110 '../third_party/externals/nanomsg/src/utils/sem.c', 111 '../third_party/externals/nanomsg/src/utils/sleep.c', 112 '../third_party/externals/nanomsg/src/utils/stopwatch.c', 113 '../third_party/externals/nanomsg/src/utils/thread.c', 114 '../third_party/externals/nanomsg/src/utils/wire.c', 115 ], 116 117 # TODO(mtklein): Support Windows? 118 # To refresh: cd third_party/externals/nanomsg; ./autogen.sh; ./configure; copy from Makefile. 119 'conditions': [ 120 ['skia_os == "linux"', { 121 'cflags': [ '-w' ], 122 'libraries': [ 123 '-lpthread', 124 '-lanl', # Provides getaddrinfo_a and co. 125 ], 126 'direct_dependent_settings': { 127 'libraries': [ '-lpthread', '-lanl' ], 128 }, 129 'defines=': [ # equals sign throws away most Skia defines (just noise) 130 'HAVE_ACCEPT4', 131 'HAVE_ARPA_INET_H', 132 'HAVE_CLOCK_GETTIME', 133 'HAVE_DLFCN_H', 134 'HAVE_EPOLL_CREATE', 135 'HAVE_EVENTFD', 136 'HAVE_GETIFADDRS', 137 'HAVE_INTTYPES_H', 138 'HAVE_MEMORY_H', 139 'HAVE_NETDB_H', 140 'HAVE_NETINET_IN_H', 141 'HAVE_PIPE', 142 'HAVE_PIPE2', 143 'HAVE_POLL', 144 'HAVE_PTHREAD_PRIO_INHERIT', 145 'HAVE_STDINT_H', 146 'HAVE_STDLIB_H', 147 'HAVE_STRINGS_H', 148 'HAVE_STRING_H', 149 'HAVE_SYS_IOCTL_H', 150 'HAVE_SYS_SOCKET_H', 151 'HAVE_SYS_STAT_H', 152 'HAVE_SYS_TYPES_H', 153 'HAVE_UNISTD_H', 154 'HAVE_UNISTD_H', 155 'NN_HAVE_ACCEPT4', 156 'NN_HAVE_CLANG', 157 'NN_HAVE_EVENTFD', 158 'NN_HAVE_GCC', 159 'NN_HAVE_GETADDRINFO_A', 160 'NN_HAVE_LINUX', 161 'NN_HAVE_PIPE', 162 'NN_HAVE_PIPE2', 163 'NN_HAVE_POLL', 164 'NN_HAVE_SEMAPHORE', 165 'NN_HAVE_SOCKETPAIR', 166 'NN_USE_EPOLL', 167 'NN_USE_EVENTFD', 168 'NN_USE_IFADDRS', 169 'STDC_HEADERS', 170 '_GNU_SOURCE', 171 ], 172 }], 173 ['skia_os == "mac"', { 174 'xcode_settings': { 175 'WARNING_CFLAGS': [ '-w' ], 176 }, 177 'defines=': [ # equals sign throws away most Skia defines (just noise) 178 'HAVE_ARPA_INET_H', 179 'HAVE_DLFCN_H', 180 'HAVE_GETIFADDRS', 181 'HAVE_INTTYPES_H', 182 'HAVE_KQUEUE', 183 'HAVE_MEMORY_H', 184 'HAVE_NETDB_H', 185 'HAVE_NETINET_IN_H', 186 'HAVE_PIPE', 187 'HAVE_POLL', 188 'HAVE_PTHREAD_PRIO_INHERIT', 189 'HAVE_STDINT_H', 190 'HAVE_STDLIB_H', 191 'HAVE_STRINGS_H', 192 'HAVE_STRING_H', 193 'HAVE_SYS_IOCTL_H', 194 'HAVE_SYS_SOCKET_H', 195 'HAVE_SYS_STAT_H', 196 'HAVE_SYS_TYPES_H', 197 'HAVE_UNISTD_H', 198 'NN_HAVE_CLANG', 199 'NN_HAVE_GCC', 200 'NN_HAVE_OSX', 201 'NN_HAVE_PIPE', 202 'NN_HAVE_POLL', 203 'NN_HAVE_SEMAPHORE', 204 'NN_HAVE_SOCKETPAIR', 205 'NN_USE_IFADDRS', 206 'NN_USE_KQUEUE', 207 'NN_USE_PIPE', 208 'STDC_HEADERS', 209 '_THREAD_SAFE', 210 ], 211 }], 212 ] 213 }] 214} 215