libuv-svace-build

Форк
0
/
Makefile.am 
560 строк · 21.4 Кб
1
# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
2
#
3
# Permission to use, copy, modify, and/or distribute this software for any
4
# purpose with or without fee is hereby granted, provided that the above
5
# copyright notice and this permission notice appear in all copies.
6
#
7
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14

15
ACLOCAL_AMFLAGS = -I m4
16

17
AM_CPPFLAGS = -I$(top_srcdir)/include \
18
              -I$(top_srcdir)/src
19

20
include_HEADERS=include/uv.h
21

22
uvincludedir = $(includedir)/uv
23
uvinclude_HEADERS = include/uv/errno.h \
24
                    include/uv/threadpool.h \
25
                    include/uv/version.h
26

27
CLEANFILES =
28

29
lib_LTLIBRARIES = libuv.la
30
libuv_la_CFLAGS = $(AM_CFLAGS)
31
libuv_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 1:0:0
32
libuv_la_SOURCES = src/fs-poll.c \
33
                   src/heap-inl.h \
34
                   src/idna.c \
35
                   src/idna.h \
36
                   src/inet.c \
37
                   src/queue.h \
38
                   src/random.c \
39
                   src/strscpy.c \
40
                   src/strscpy.h \
41
                   src/thread-common.c \
42
                   src/threadpool.c \
43
                   src/timer.c \
44
                   src/uv-data-getter-setters.c \
45
                   src/uv-common.c \
46
                   src/uv-common.h \
47
                   src/version.c \
48
                   src/strtok.c \
49
                   src/strtok.h
50

51
if SUNOS
52
# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers
53
# on other platforms complain that the argument is unused during compilation.
54
libuv_la_CFLAGS += -pthreads
55
endif
56

57
if WINNT
58

59
uvinclude_HEADERS += include/uv/win.h include/uv/tree.h
60
AM_CPPFLAGS += -I$(top_srcdir)/src/win \
61
               -DWIN32_LEAN_AND_MEAN \
62
               -D_WIN32_WINNT=0x0602
63
libuv_la_SOURCES += src/win/async.c \
64
                    src/win/atomicops-inl.h \
65
                    src/win/core.c \
66
                    src/win/detect-wakeup.c \
67
                    src/win/dl.c \
68
                    src/win/error.c \
69
                    src/win/fs-event.c \
70
                    src/win/fs.c \
71
                    src/win/getaddrinfo.c \
72
                    src/win/getnameinfo.c \
73
                    src/win/handle.c \
74
                    src/win/handle-inl.h \
75
                    src/win/internal.h \
76
                    src/win/loop-watcher.c \
77
                    src/win/pipe.c \
78
                    src/win/poll.c \
79
                    src/win/process-stdio.c \
80
                    src/win/process.c \
81
                    src/win/req-inl.h \
82
                    src/win/signal.c \
83
                    src/win/stream.c \
84
                    src/win/stream-inl.h \
85
                    src/win/tcp.c \
86
                    src/win/thread.c \
87
                    src/win/tty.c \
88
                    src/win/udp.c \
89
                    src/win/util.c \
90
                    src/win/winapi.c \
91
                    src/win/winapi.h \
92
                    src/win/winsock.c \
93
                    src/win/winsock.h
94

95
else  # WINNT
96

97
uvinclude_HEADERS += include/uv/unix.h
98
AM_CPPFLAGS += -I$(top_srcdir)/src/unix
99
libuv_la_SOURCES += src/unix/async.c \
100
                   src/unix/core.c \
101
                   src/unix/dl.c \
102
                   src/unix/fs.c \
103
                   src/unix/getaddrinfo.c \
104
                   src/unix/getnameinfo.c \
105
                   src/unix/internal.h \
106
                   src/unix/loop-watcher.c \
107
                   src/unix/loop.c \
108
                   src/unix/pipe.c \
109
                   src/unix/poll.c \
110
                   src/unix/process.c \
111
                   src/unix/random-devurandom.c \
112
                   src/unix/signal.c \
113
                   src/unix/stream.c \
114
                   src/unix/tcp.c \
115
                   src/unix/thread.c \
116
                   src/unix/tty.c \
117
                   src/unix/udp.c
118

119
endif  # WINNT
120

121
EXTRA_DIST = test/fixtures/empty_file \
122
             test/fixtures/load_error.node \
123
             test/fixtures/lorem_ipsum.txt \
124
             test/fixtures/one_file/one_file \
125
             include \
126
             docs \
127
             img \
128
             CONTRIBUTING.md \
129
             LICENSE \
130
             LICENSE-extra \
131
             README.md
132

133

134

135
TESTS = test/run-tests
136
check_PROGRAMS = test/run-tests
137
test_run_tests_CFLAGS = $(AM_CFLAGS)
138

139
if WINNT
140
check-am: test/run-tests_no_ext
141
test/run-tests_no_ext: test/run-tests$(EXEEXT)
142
	cp test/run-tests$(EXEEXT) test/run-tests_no_ext
143
endif
144

145
if SUNOS
146
# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers
147
# on other platforms complain that the argument is unused during compilation.
148
test_run_tests_CFLAGS += -pthreads
149
endif
150

151
test_run_tests_LDFLAGS = $(AM_LDFLAGS)
152
test_run_tests_SOURCES = test/blackhole-server.c \
153
                         test/echo-server.c \
154
                         test/run-tests.c \
155
                         test/runner.c \
156
                         test/runner.h \
157
                         test/task.h \
158
                         test/test-active.c \
159
                         test/test-async.c \
160
                         test/test-async-null-cb.c \
161
                         test/test-barrier.c \
162
                         test/test-callback-stack.c \
163
                         test/test-close-fd.c \
164
                         test/test-close-order.c \
165
                         test/test-condvar.c \
166
                         test/test-connect-unspecified.c \
167
                         test/test-connection-fail.c \
168
                         test/test-cwd-and-chdir.c \
169
                         test/test-default-loop-close.c \
170
                         test/test-delayed-accept.c \
171
                         test/test-dlerror.c \
172
                         test/test-eintr-handling.c \
173
                         test/test-embed.c \
174
                         test/test-emfile.c \
175
                         test/test-env-vars.c \
176
                         test/test-error.c \
177
                         test/test-fail-always.c \
178
                         test/test-fs-copyfile.c \
179
                         test/test-fs-event.c \
180
                         test/test-fs-poll.c \
181
                         test/test-fs.c \
182
                         test/test-fs-readdir.c \
183
                         test/test-fs-fd-hash.c \
184
                         test/test-fs-open-flags.c \
185
                         test/test-fork.c \
186
                         test/test-getters-setters.c \
187
                         test/test-get-currentexe.c \
188
                         test/test-get-loadavg.c \
189
                         test/test-get-memory.c \
190
                         test/test-get-passwd.c \
191
                         test/test-getaddrinfo.c \
192
                         test/test-gethostname.c \
193
                         test/test-getnameinfo.c \
194
                         test/test-getsockname.c \
195
                         test/test-gettimeofday.c \
196
                         test/test-handle-fileno.c \
197
                         test/test-homedir.c \
198
                         test/test-hrtime.c \
199
                         test/test-idle.c \
200
                         test/test-idna.c \
201
                         test/test-iouring-pollhup.c \
202
                         test/test-ip4-addr.c \
203
                         test/test-ip6-addr.c \
204
                         test/test-ip-name.c \
205
                         test/test-ipc-heavy-traffic-deadlock-bug.c \
206
                         test/test-ipc-send-recv.c \
207
                         test/test-ipc.c \
208
                         test/test-list.h \
209
                         test/test-loop-handles.c \
210
                         test/test-loop-alive.c \
211
                         test/test-loop-close.c \
212
                         test/test-loop-stop.c \
213
                         test/test-loop-time.c \
214
                         test/test-loop-configure.c \
215
                         test/test-metrics.c \
216
                         test/test-multiple-listen.c \
217
                         test/test-mutexes.c \
218
                         test/test-not-readable-nor-writable-on-read-error.c \
219
                         test/test-not-writable-after-shutdown.c \
220
                         test/test-osx-select.c \
221
                         test/test-pass-always.c \
222
                         test/test-ping-pong.c \
223
                         test/test-pipe-bind-error.c \
224
                         test/test-pipe-connect-error.c \
225
                         test/test-pipe-connect-multiple.c \
226
                         test/test-pipe-connect-prepare.c \
227
                         test/test-pipe-getsockname.c \
228
                         test/test-pipe-pending-instances.c \
229
                         test/test-pipe-sendmsg.c \
230
                         test/test-pipe-server-close.c \
231
                         test/test-pipe-close-stdout-read-stdin.c \
232
                         test/test-pipe-set-non-blocking.c \
233
                         test/test-pipe-set-fchmod.c \
234
                         test/test-platform-output.c \
235
                         test/test-poll.c \
236
                         test/test-poll-close.c \
237
                         test/test-poll-close-doesnt-corrupt-stack.c \
238
                         test/test-poll-closesocket.c \
239
                         test/test-poll-multiple-handles.c \
240
                         test/test-poll-oob.c \
241
                         test/test-process-priority.c \
242
                         test/test-process-title.c \
243
                         test/test-process-title-threadsafe.c \
244
                         test/test-queue-foreach-delete.c \
245
                         test/test-random.c \
246
                         test/test-readable-on-eof.c \
247
                         test/test-ref.c \
248
                         test/test-run-nowait.c \
249
                         test/test-run-once.c \
250
                         test/test-semaphore.c \
251
                         test/test-shutdown-close.c \
252
                         test/test-shutdown-eof.c \
253
                         test/test-shutdown-simultaneous.c \
254
                         test/test-shutdown-twice.c \
255
                         test/test-signal-multiple-loops.c \
256
                         test/test-signal-pending-on-close.c \
257
                         test/test-signal.c \
258
                         test/test-socket-buffer-size.c \
259
                         test/test-spawn.c \
260
                         test/test-stdio-over-pipes.c \
261
                         test/test-strscpy.c \
262
                         test/test-strtok.c \
263
                         test/test-tcp-alloc-cb-fail.c \
264
                         test/test-tcp-bind-error.c \
265
                         test/test-tcp-bind6-error.c \
266
                         test/test-tcp-close-accept.c \
267
                         test/test-tcp-close-while-connecting.c \
268
                         test/test-tcp-close-after-read-timeout.c \
269
                         test/test-tcp-close.c \
270
                         test/test-tcp-close-reset.c \
271
                         test/test-tcp-create-socket-early.c \
272
                         test/test-tcp-connect-error-after-write.c \
273
                         test/test-tcp-connect-error.c \
274
                         test/test-tcp-connect-timeout.c \
275
                         test/test-tcp-connect6-error.c \
276
                         test/test-tcp-flags.c \
277
                         test/test-tcp-open.c \
278
                         test/test-tcp-read-stop.c \
279
                         test/test-tcp-reuseport.c \
280
                         test/test-tcp-read-stop-start.c \
281
                         test/test-tcp-rst.c \
282
                         test/test-tcp-shutdown-after-write.c \
283
                         test/test-tcp-unexpected-read.c \
284
                         test/test-tcp-oob.c \
285
                         test/test-tcp-write-to-half-open-connection.c \
286
                         test/test-tcp-write-after-connect.c \
287
                         test/test-tcp-writealot.c \
288
                         test/test-tcp-write-fail.c \
289
                         test/test-tcp-try-write.c \
290
                         test/test-tcp-write-in-a-row.c \
291
                         test/test-tcp-try-write-error.c \
292
                         test/test-tcp-write-queue-order.c \
293
                         test/test-test-macros.c \
294
                         test/test-thread-equal.c \
295
                         test/test-thread.c \
296
                         test/test-thread-affinity.c \
297
                         test/test-thread-priority.c \
298
                         test/test-threadpool-cancel.c \
299
                         test/test-threadpool.c \
300
                         test/test-timer-again.c \
301
                         test/test-timer-from-check.c \
302
                         test/test-timer.c \
303
                         test/test-tmpdir.c \
304
                         test/test-tty-duplicate-key.c \
305
                         test/test-tty-escape-sequence-processing.c \
306
                         test/test-tty.c \
307
                         test/test-udp-alloc-cb-fail.c \
308
                         test/test-udp-bind.c \
309
                         test/test-udp-connect.c \
310
                         test/test-udp-connect6.c \
311
                         test/test-udp-create-socket-early.c \
312
                         test/test-udp-dgram-too-big.c \
313
                         test/test-udp-ipv6.c \
314
                         test/test-udp-mmsg.c \
315
                         test/test-udp-multicast-interface.c \
316
                         test/test-udp-multicast-interface6.c \
317
                         test/test-udp-multicast-join.c \
318
                         test/test-udp-multicast-join6.c \
319
                         test/test-udp-multicast-ttl.c \
320
                         test/test-udp-open.c \
321
                         test/test-udp-options.c \
322
                         test/test-udp-send-and-recv.c \
323
                         test/test-udp-send-hang-loop.c \
324
                         test/test-udp-send-immediate.c \
325
                         test/test-udp-sendmmsg-error.c \
326
                         test/test-udp-send-unreachable.c \
327
                         test/test-udp-try-send.c \
328
                         test/test-udp-recv-in-a-row.c \
329
                         test/test-udp-reuseport.c \
330
                         test/test-uname.c \
331
                         test/test-walk-handles.c \
332
                         test/test-watcher-cross-stop.c
333
test_run_tests_LDADD = libuv.la
334

335
if WINNT
336
test_run_tests_SOURCES += test/runner-win.c \
337
                          test/runner-win.h
338
else
339
test_run_tests_SOURCES += test/runner-unix.c \
340
                          test/runner-unix.h
341
endif
342

343
if AIX
344
test_run_tests_CFLAGS += -D_ALL_SOURCE \
345
                         -D_XOPEN_SOURCE=500 \
346
                         -D_LINUX_SOURCE_COMPAT
347
endif
348

349
if OS400
350
test_run_tests_CFLAGS += -D_ALL_SOURCE \
351
                         -D_XOPEN_SOURCE=500 \
352
                         -D_LINUX_SOURCE_COMPAT
353
endif
354

355
if HAIKU
356
test_run_tests_CFLAGS += -D_BSD_SOURCE
357
endif
358

359
if LINUX
360
test_run_tests_CFLAGS += -D_GNU_SOURCE
361
endif
362

363
if SUNOS
364
test_run_tests_CFLAGS += -D__EXTENSIONS__ \
365
                         -D_XOPEN_SOURCE=500 \
366
                         -D_REENTRANT
367
endif
368

369
if OS390
370
test_run_tests_CFLAGS += -D_ISOC99_SOURCE \
371
                         -D_UNIX03_THREADS \
372
                         -D_UNIX03_SOURCE \
373
                         -D_OPEN_SYS_IF_EXT=1 \
374
                         -D_OPEN_SYS_SOCK_IPV6 \
375
                         -D_OPEN_MSGQ_EXT \
376
                         -D_XOPEN_SOURCE_EXTENDED \
377
                         -D_ALL_SOURCE \
378
                         -D_LARGE_TIME_API \
379
                         -D_OPEN_SYS_FILE_EXT \
380
                         -DPATH_MAX=255 \
381
                         -qCHARS=signed \
382
                         -qXPLINK \
383
                         -qFLOAT=IEEE
384
endif
385

386
if AIX
387
libuv_la_CFLAGS += -D_ALL_SOURCE \
388
                   -D_XOPEN_SOURCE=500 \
389
                   -D_LINUX_SOURCE_COMPAT \
390
                   -D_THREAD_SAFE \
391
                   -DHAVE_SYS_AHAFS_EVPRODS_H
392
uvinclude_HEADERS += include/uv/aix.h
393
libuv_la_SOURCES += src/unix/aix.c src/unix/aix-common.c
394
endif
395

396
if OS400
397
libuv_la_CFLAGS += -D_ALL_SOURCE \
398
                   -D_XOPEN_SOURCE=500 \
399
                   -D_LINUX_SOURCE_COMPAT \
400
                   -D_THREAD_SAFE
401
uvinclude_HEADERS += include/uv/posix.h
402
libuv_la_SOURCES += src/unix/aix-common.c \
403
                    src/unix/ibmi.c \
404
                    src/unix/posix-poll.c \
405
                    src/unix/no-fsevents.c
406
endif
407

408
if ANDROID
409
libuv_la_CFLAGS += -D_GNU_SOURCE
410
endif
411

412
if CYGWIN
413
uvinclude_HEADERS += include/uv/posix.h
414
libuv_la_CFLAGS += -D_GNU_SOURCE
415
libuv_la_SOURCES += src/unix/cygwin.c \
416
                    src/unix/bsd-ifaddrs.c \
417
                    src/unix/no-fsevents.c \
418
                    src/unix/no-proctitle.c \
419
                    src/unix/posix-hrtime.c \
420
                    src/unix/posix-poll.c \
421
                    src/unix/procfs-exepath.c \
422
                    src/unix/sysinfo-loadavg.c \
423
                    src/unix/sysinfo-memory.c
424
endif
425

426
if DARWIN
427
uvinclude_HEADERS += include/uv/darwin.h
428
libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
429
libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
430
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
431
                    src/unix/darwin-proctitle.c \
432
                    src/unix/darwin-stub.h \
433
                    src/unix/darwin.c \
434
                    src/unix/fsevents.c \
435
                    src/unix/kqueue.c \
436
                    src/unix/proctitle.c \
437
                    src/unix/random-getentropy.c
438
test_run_tests_LDFLAGS += -lutil
439
endif
440

441
if DRAGONFLY
442
uvinclude_HEADERS += include/uv/bsd.h
443
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
444
                    src/unix/bsd-proctitle.c \
445
                    src/unix/freebsd.c \
446
                    src/unix/kqueue.c \
447
                    src/unix/posix-hrtime.c
448
test_run_tests_LDFLAGS += -lutil
449
endif
450

451
if FREEBSD
452
uvinclude_HEADERS += include/uv/bsd.h
453
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
454
                    src/unix/bsd-proctitle.c \
455
                    src/unix/freebsd.c \
456
                    src/unix/kqueue.c \
457
                    src/unix/posix-hrtime.c \
458
                    src/unix/random-getrandom.c
459
test_run_tests_LDFLAGS += -lutil
460
endif
461

462
if HAIKU
463
uvinclude_HEADERS += include/uv/posix.h
464
libuv_la_CFLAGS += -D_BSD_SOURCE
465
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
466
                    src/unix/haiku.c \
467
                    src/unix/no-fsevents.c \
468
                    src/unix/no-proctitle.c \
469
                    src/unix/posix-hrtime.c \
470
                    src/unix/posix-poll.c
471
endif
472

473
if HURD
474
uvinclude_HEADERS += include/uv/posix.h
475
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
476
                    src/unix/no-fsevents.c \
477
                    src/unix/no-proctitle.c \
478
                    src/unix/posix-hrtime.c \
479
                    src/unix/posix-poll.c \
480
                    src/unix/hurd.c
481
endif
482

483
if LINUX
484
uvinclude_HEADERS += include/uv/linux.h
485
libuv_la_CFLAGS += -D_GNU_SOURCE
486
libuv_la_SOURCES += src/unix/linux.c \
487
                    src/unix/procfs-exepath.c \
488
                    src/unix/proctitle.c \
489
                    src/unix/random-getrandom.c \
490
                    src/unix/random-sysctl-linux.c
491
test_run_tests_LDFLAGS += -lutil
492
endif
493

494
if MSYS
495
libuv_la_CFLAGS += -D_GNU_SOURCE
496
libuv_la_SOURCES += src/unix/cygwin.c \
497
                    src/unix/bsd-ifaddrs.c \
498
                    src/unix/no-fsevents.c \
499
                    src/unix/no-proctitle.c \
500
                    src/unix/posix-hrtime.c \
501
                    src/unix/posix-poll.c \
502
                    src/unix/procfs-exepath.c \
503
                    src/unix/sysinfo-loadavg.c \
504
                    src/unix/sysinfo-memory.c
505
endif
506

507
if NETBSD
508
uvinclude_HEADERS += include/uv/bsd.h
509
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
510
                    src/unix/bsd-proctitle.c \
511
                    src/unix/kqueue.c \
512
                    src/unix/netbsd.c \
513
                    src/unix/posix-hrtime.c
514
test_run_tests_LDFLAGS += -lutil
515
endif
516

517
if OPENBSD
518
uvinclude_HEADERS += include/uv/bsd.h
519
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
520
                    src/unix/bsd-proctitle.c \
521
                    src/unix/kqueue.c \
522
                    src/unix/openbsd.c \
523
                    src/unix/posix-hrtime.c \
524
                    src/unix/random-getentropy.c
525
test_run_tests_LDFLAGS += -lutil
526
endif
527

528
if SUNOS
529
uvinclude_HEADERS += include/uv/sunos.h
530
libuv_la_CFLAGS += -D__EXTENSIONS__ \
531
                   -D_XOPEN_SOURCE=500 \
532
                   -D_REENTRANT
533
libuv_la_SOURCES += src/unix/no-proctitle.c \
534
                    src/unix/sunos.c
535
endif
536

537
if OS390
538
libuv_la_CFLAGS += -D_UNIX03_THREADS \
539
                   -D_UNIX03_SOURCE \
540
                   -D_OPEN_SYS_IF_EXT=1 \
541
                   -D_OPEN_MSGQ_EXT \
542
                   -D_XOPEN_SOURCE_EXTENDED \
543
                   -D_ALL_SOURCE \
544
                   -D_LARGE_TIME_API \
545
                   -D_OPEN_SYS_SOCK_EXT3 \
546
                   -D_OPEN_SYS_SOCK_IPV6 \
547
                   -D_OPEN_SYS_FILE_EXT \
548
                   -DUV_PLATFORM_SEM_T=int \
549
                   -DPATH_MAX=255 \
550
                   -qCHARS=signed \
551
                   -qXPLINK \
552
                   -qFLOAT=IEEE
553
libuv_la_LDFLAGS += -qXPLINK
554
libuv_la_SOURCES += src/unix/os390.c \
555
                    src/unix/os390-syscalls.c \
556
                    src/unix/proctitle.c
557
endif
558

559
pkgconfigdir = $(libdir)/pkgconfig
560
pkgconfig_DATA = @PACKAGE_NAME@.pc
561

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.