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