Makefile.am 22.3 KB
Newer Older
1 2
ACLOCAL_AMFLAGS = -I config

3 4
SUBDIRS = doc

5
DIST_SUBDIRS = doc builds builds/msvc
6 7 8

pkgconfig_DATA = src/libzmq.pc

9 10 11 12 13 14 15
AM_CPPFLAGS = \
	-I$(top_builddir)/include \
	-I$(top_srcdir)/include

#
# libraries/binaries
#
16
lib_LTLIBRARIES = src/libzmq.la
17 18

include_HEADERS = \
Min RK's avatar
Min RK committed
19 20
	include/zmq.h \
	include/zmq_utils.h
21

22
src_libzmq_la_SOURCES = \
23 24 25 26 27 28
	src/address.cpp \
	src/address.hpp \
	src/array.hpp \
	src/atomic_counter.hpp \
	src/atomic_ptr.hpp \
	src/blob.hpp \
29 30
	src/client.cpp \
	src/client.hpp \
31 32 33
	src/clock.cpp \
	src/clock.hpp \
	src/command.hpp \
somdoron's avatar
somdoron committed
34
	src/condition_variable.hpp \
35 36 37 38 39
	src/config.hpp \
	src/ctx.cpp \
	src/ctx.hpp \
	src/curve_client.cpp \
	src/curve_client.hpp \
40
	src/curve_client_tools.hpp \
41 42
	src/curve_mechanism_base.cpp \
	src/curve_mechanism_base.hpp \
43 44 45 46 47 48 49 50
	src/curve_server.cpp \
	src/curve_server.hpp \
	src/dbuffer.hpp \
	src/dealer.cpp \
	src/dealer.hpp \
	src/decoder.hpp \
	src/devpoll.cpp \
	src/devpoll.hpp \
51 52
	src/dgram.cpp \
	src/dgram.hpp \
somdoron's avatar
somdoron committed
53 54
	src/dish.cpp \
	src/dish.hpp \
55 56 57 58 59 60 61 62 63 64
	src/dist.cpp \
	src/dist.hpp \
	src/encoder.hpp \
	src/epoll.cpp \
	src/epoll.hpp \
	src/err.cpp \
	src/err.hpp \
	src/fd.hpp \
	src/fq.cpp \
	src/fq.hpp \
somdoron's avatar
somdoron committed
65 66
	src/gather.cpp \
	src/gather.hpp \
67 68 69 70 71 72 73 74 75
	src/gssapi_mechanism_base.cpp \
	src/gssapi_mechanism_base.hpp \
	src/gssapi_client.cpp \
	src/gssapi_client.hpp \
	src/gssapi_server.cpp \
	src/gssapi_server.hpp \
	src/i_encoder.hpp \
	src/i_engine.hpp \
	src/i_decoder.hpp \
somdoron's avatar
somdoron committed
76
	src/i_mailbox.hpp \
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
	src/i_poll_events.hpp \
	src/io_object.cpp \
	src/io_object.hpp \
	src/io_thread.cpp \
	src/io_thread.hpp \
	src/ip.cpp \
	src/ip.hpp \
	src/ipc_address.cpp \
	src/ipc_address.hpp \
	src/ipc_connecter.cpp \
	src/ipc_connecter.hpp \
	src/ipc_listener.cpp \
	src/ipc_listener.hpp \
	src/kqueue.cpp \
	src/kqueue.hpp \
	src/lb.cpp \
	src/lb.hpp \
	src/likely.hpp \
95
	src/macros.hpp \
96 97
	src/mailbox.cpp \
	src/mailbox.hpp \
somdoron's avatar
somdoron committed
98 99
	src/mailbox_safe.cpp \
	src/mailbox_safe.hpp \
100 101
	src/mechanism.cpp \
	src/mechanism.hpp  \
102 103
	src/mechanism_base.cpp \
	src/mechanism_base.hpp  \
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
	src/metadata.cpp \
	src/metadata.hpp \
	src/msg.cpp \
	src/msg.hpp \
	src/mtrie.cpp \
	src/mtrie.hpp \
	src/mutex.hpp \
	src/norm_engine.cpp \
	src/norm_engine.hpp \
	src/null_mechanism.cpp \
	src/null_mechanism.hpp \
	src/object.cpp \
	src/object.hpp \
	src/options.cpp \
	src/options.hpp \
	src/own.cpp \
	src/own.hpp \
	src/pair.cpp \
	src/pair.hpp \
	src/pgm_receiver.cpp \
	src/pgm_receiver.hpp \
	src/pgm_sender.cpp \
	src/pgm_sender.hpp \
	src/pgm_socket.cpp \
	src/pgm_socket.hpp \
	src/pipe.cpp \
	src/pipe.hpp \
	src/plain_client.cpp \
	src/plain_client.hpp \
	src/plain_server.cpp \
	src/plain_server.hpp \
	src/platform.hpp \
	src/poll.cpp \
	src/poll.hpp \
	src/poller.hpp \
	src/poller_base.cpp \
	src/poller_base.hpp \
Laughing's avatar
Laughing committed
141 142
	src/pollset.cpp \
	src/pollset.hpp \
143 144
	src/precompiled.cpp \
	src/precompiled.hpp \
145 146 147 148 149 150 151 152
	src/proxy.cpp \
	src/proxy.hpp \
	src/pub.cpp \
	src/pub.hpp \
	src/pull.cpp \
	src/pull.hpp \
	src/push.cpp \
	src/push.hpp \
somdoron's avatar
somdoron committed
153 154
	src/radio.cpp \
	src/radio.hpp \
155 156 157 158 159 160 161 162 163 164 165 166 167 168
	src/random.cpp \
	src/random.hpp \
	src/raw_decoder.cpp \
	src/raw_decoder.hpp \
	src/raw_encoder.cpp \
	src/raw_encoder.hpp \
	src/reaper.cpp \
	src/reaper.hpp \
	src/rep.cpp \
	src/rep.hpp \
	src/req.cpp \
	src/req.hpp \
	src/router.cpp \
	src/router.hpp \
somdoron's avatar
somdoron committed
169 170
	src/scatter.cpp \
	src/scatter.hpp \
171 172
	src/select.cpp \
	src/select.hpp \
173 174
	src/server.cpp \
	src/server.hpp \
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
	src/session_base.cpp \
	src/session_base.hpp \
	src/signaler.cpp \
	src/signaler.hpp \
	src/socket_base.cpp \
	src/socket_base.hpp \
	src/socks.cpp \
	src/socks.hpp \
	src/socks_connecter.cpp \
	src/socks_connecter.hpp \
	src/stdint.hpp \
	src/stream.cpp \
	src/stream.hpp \
	src/stream_engine.cpp \
	src/stream_engine.hpp \
	src/sub.cpp \
	src/sub.hpp \
	src/tcp.cpp \
	src/tcp.hpp \
	src/tcp_address.cpp \
	src/tcp_address.hpp \
	src/tcp_connecter.cpp \
	src/tcp_connecter.hpp \
	src/tcp_listener.cpp \
	src/tcp_listener.hpp \
	src/thread.cpp \
	src/thread.hpp \
somdoron's avatar
somdoron committed
202 203
	src/timers.cpp \
	src/timers.hpp \
204 205 206 207 208 209 210 211
	src/tipc_address.cpp \
	src/tipc_address.hpp \
	src/tipc_connecter.cpp \
	src/tipc_connecter.hpp \
	src/tipc_listener.cpp \
	src/tipc_listener.hpp \
	src/trie.cpp \
	src/trie.hpp \
212 213 214 215
	src/udp_address.cpp \
	src/udp_address.hpp \
	src/udp_engine.cpp \
	src/udp_engine.hpp \
216 217 218 219 220 221 222 223 224
	src/v1_decoder.cpp \
	src/v1_decoder.hpp \
	src/v2_decoder.cpp \
	src/v2_decoder.hpp \
	src/v1_encoder.cpp \
	src/v1_encoder.hpp \
	src/v2_encoder.cpp \
	src/v2_encoder.hpp \
	src/v2_protocol.hpp \
Ilya Kulakov's avatar
Ilya Kulakov committed
225 226 227 228 229 230 231 232
	src/vmci.cpp \
	src/vmci.hpp \
	src/vmci_address.cpp \
	src/vmci_address.hpp \
	src/vmci_connecter.cpp \
	src/vmci_connecter.hpp \
	src/vmci_listener.cpp \
	src/vmci_listener.hpp \
233 234 235
	src/windows.hpp \
	src/wire.hpp \
	src/xpub.cpp \
236
	src/xpub.hpp \
237 238 239 240 241 242 243
	src/xsub.cpp \
	src/xsub.hpp \
	src/ypipe.hpp \
	src/ypipe_base.hpp \
	src/ypipe_conflate.hpp \
	src/yqueue.hpp \
	src/zmq.cpp \
Jens Auer's avatar
Jens Auer committed
244
	src/zmq_utils.cpp \
245 246 247
	src/decoder_allocators.cpp \
	src/decoder_allocators.hpp \
	src/socket_poller.cpp \
248
	src/socket_poller.hpp \
249 250
	src/zap_client.cpp \
	src/zap_client.hpp \
251
	src/zmq_draft.h
Jens Auer's avatar
Jens Auer committed
252

253 254 255 256 257 258
if USE_TWEETNACL
src_libzmq_la_SOURCES += \
	src/tweetnacl.c \
	src/tweetnacl.h
endif

259
if ON_MINGW
260
src_libzmq_la_LDFLAGS = \
261 262 263 264 265
	-no-undefined \
	-avoid-version \
	-version-info @LTVER@ \
	@LIBZMQ_EXTRA_LDFLAGS@
else
266 267 268 269 270 271 272
if ON_CYGWIN
src_libzmq_la_LDFLAGS = \
	-no-undefined \
	-avoid-version \
	-version-info @LTVER@ \
	@LIBZMQ_EXTRA_LDFLAGS@
else
273
if ON_ANDROID
274
src_libzmq_la_LDFLAGS = \
275 276 277
	-avoid-version \
	-version-info @LTVER@ \
	@LIBZMQ_EXTRA_LDFLAGS@
278
else
279
if ON_LINUX
280
src_libzmq_la_LDFLAGS = \
281 282 283 284
	-version-info @LTVER@ \
	@LIBZMQ_EXTRA_LDFLAGS@ \
	-Wl,--version-script=$(srcdir)/src/libzmq.vers
else
285
src_libzmq_la_LDFLAGS = \
286 287 288 289 290 291
	-version-info @LTVER@ \
	@LIBZMQ_EXTRA_LDFLAGS@ \
	-Wl
endif
endif
endif
292
endif
293

294 295 296 297 298
src_libzmq_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) $(LIBUNWIND_CFLAGS)
src_libzmq_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) $(LIBUNWIND_CFLAGS)
src_libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ $(CODE_COVERAGE_CXXFLAGS) \
	$(LIBUNWIND_CFLAGS)
src_libzmq_la_LIBADD = $(CODE_COVERAGE_LDFLAGS) $(LIBUNWIND_LIBS)
299

300 301 302 303 304
if USE_LIBSODIUM
src_libzmq_la_CPPFLAGS += ${sodium_CFLAGS}
src_libzmq_la_LIBADD += ${sodium_LIBS}
endif

305
if HAVE_PGM
306 307
src_libzmq_la_CPPFLAGS += ${pgm_CFLAGS}
src_libzmq_la_LIBADD += ${pgm_LIBS}
308 309
endif

310 311 312 313 314
if BUILD_GSSAPI
src_libzmq_la_CPPFLAGS += ${gssapi_krb5_CFLAGS}
src_libzmq_la_LIBADD += ${gssapi_krb5_LIBS}
endif

315
if ENABLE_PERF
316
noinst_PROGRAMS = \
317 318 319 320 321 322
	perf/local_lat \
	perf/remote_lat \
	perf/local_thr \
	perf/remote_thr \
	perf/inproc_lat \
	perf/inproc_thr
323

324 325
perf_local_lat_LDADD = src/libzmq.la
perf_local_lat_SOURCES = perf/local_lat.cpp
326

327 328
perf_remote_lat_LDADD = src/libzmq.la
perf_remote_lat_SOURCES = perf/remote_lat.cpp
329

330 331
perf_local_thr_LDADD = src/libzmq.la
perf_local_thr_SOURCES = perf/local_thr.cpp
332

333 334
perf_remote_thr_LDADD = src/libzmq.la
perf_remote_thr_SOURCES = perf/remote_thr.cpp
335

336 337
perf_inproc_lat_LDADD = src/libzmq.la
perf_inproc_lat_SOURCES = perf/inproc_lat.cpp
338

339 340
perf_inproc_thr_LDADD = src/libzmq.la
perf_inproc_thr_SOURCES = perf/inproc_thr.cpp
341
endif
342

343
if ENABLE_CURVE_KEYGEN
344
bin_PROGRAMS = tools/curve_keygen
345

346 347
tools_curve_keygen_LDADD = src/libzmq.la
tools_curve_keygen_SOURCES = tools/curve_keygen.cpp
348
endif
349

350 351 352
#
# tests
#
353
test_apps = \
354
	tests/test_ancillaries \
355 356 357 358 359 360 361 362 363 364 365
	tests/test_system \
	tests/test_pair_inproc \
	tests/test_pair_tcp \
	tests/test_reqrep_inproc \
	tests/test_reqrep_tcp \
	tests/test_hwm \
	tests/test_hwm_pubsub \
	tests/test_reqrep_device \
	tests/test_sub_forward \
	tests/test_invalid_rep \
	tests/test_msg_flags \
366
	tests/test_msg_ffn \
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
	tests/test_connect_resolve \
	tests/test_immediate \
	tests/test_last_endpoint \
	tests/test_term_endpoint \
	tests/test_srcfd \
	tests/test_monitor \
	tests/test_router_mandatory \
	tests/test_router_mandatory_hwm \
	tests/test_router_handover \
	tests/test_probe_router \
	tests/test_stream \
	tests/test_stream_empty \
	tests/test_stream_disconnect \
	tests/test_stream_timeout \
	tests/test_disconnect_inproc \
Dylan Cali's avatar
Dylan Cali committed
382 383
	tests/test_unbind_inproc \
	tests/test_unbind_wildcard \
384 385 386 387
	tests/test_ctx_options \
	tests/test_ctx_destroy \
	tests/test_security_null \
	tests/test_security_plain \
388
	tests/test_security_zap \
389 390 391 392 393 394 395 396 397 398 399 400
	tests/test_iov \
	tests/test_spec_req \
	tests/test_spec_rep \
	tests/test_spec_dealer \
	tests/test_spec_router \
	tests/test_spec_pushpull \
	tests/test_req_correlate \
	tests/test_req_relaxed \
	tests/test_conflate \
	tests/test_inproc_connect \
	tests/test_issue_566 \
	tests/test_proxy \
401
	tests/test_proxy_single_socket \
402
	tests/test_proxy_terminate \
403
	tests/test_getsockopt_memset \
404
	tests/test_setsockopt \
405 406 407 408 409
	tests/test_diffserv \
	tests/test_connect_rid \
	tests/test_bind_src_address \
	tests/test_metadata \
	tests/test_capabilities \
410
	tests/test_xpub_nodrop \
somdoron's avatar
somdoron committed
411
	tests/test_xpub_manual \
412
	tests/test_xpub_welcome_msg \
413
	tests/test_atomics \
414
	tests/test_sockopt_hwm \
415
	tests/test_heartbeats \
416
	tests/test_stream_exceeds_buffer \
417 418
	tests/test_pub_invert_matching \
	tests/test_base85 \
419
	tests/test_bind_after_connect_tcp \
420
	tests/test_sodium
421

422 423 424
tests_test_ancillaries_SOURCES = tests/test_ancillaries.cpp
tests_test_ancillaries_LDADD = src/libzmq.la

425 426 427 428
tests_test_system_SOURCES = tests/test_system.cpp
tests_test_system_LDADD = src/libzmq.la

tests_test_pair_inproc_SOURCES = \
429 430
	tests/test_pair_inproc.cpp \
	tests/testutil.hpp
431
tests_test_pair_inproc_LDADD = src/libzmq.la
432

433
tests_test_pair_tcp_SOURCES = \
434 435
	tests/test_pair_tcp.cpp \
	tests/testutil.hpp
436
tests_test_pair_tcp_LDADD = src/libzmq.la
437

438
tests_test_reqrep_inproc_SOURCES = \
439 440
	tests/test_reqrep_inproc.cpp \
	tests/testutil.hpp
441
tests_test_reqrep_inproc_LDADD = src/libzmq.la
442

443
tests_test_reqrep_tcp_SOURCES = \
444 445
	tests/test_reqrep_tcp.cpp \
	tests/testutil.hpp
446
tests_test_reqrep_tcp_LDADD = src/libzmq.la
447

448 449
tests_test_hwm_SOURCES = tests/test_hwm.cpp
tests_test_hwm_LDADD = src/libzmq.la
450

451 452
tests_test_hwm_pubsub_SOURCES = tests/test_hwm_pubsub.cpp
tests_test_hwm_pubsub_LDADD = src/libzmq.la
453

454 455
tests_test_reqrep_device_SOURCES = tests/test_reqrep_device.cpp
tests_test_reqrep_device_LDADD = src/libzmq.la
456

457 458
tests_test_sub_forward_SOURCES = tests/test_sub_forward.cpp
tests_test_sub_forward_LDADD = src/libzmq.la
459

460 461
tests_test_invalid_rep_SOURCES = tests/test_invalid_rep.cpp
tests_test_invalid_rep_LDADD = src/libzmq.la
462

463 464
tests_test_msg_flags_SOURCES = tests/test_msg_flags.cpp
tests_test_msg_flags_LDADD = src/libzmq.la
465

466 467 468
tests_test_msg_ffn_SOURCES = tests/test_msg_ffn.cpp
tests_test_msg_ffn_LDADD = src/libzmq.la

469 470
tests_test_connect_resolve_SOURCES = tests/test_connect_resolve.cpp
tests_test_connect_resolve_LDADD = src/libzmq.la
471

472 473
tests_test_immediate_SOURCES = tests/test_immediate.cpp
tests_test_immediate_LDADD = src/libzmq.la
474

475 476
tests_test_last_endpoint_SOURCES = tests/test_last_endpoint.cpp
tests_test_last_endpoint_LDADD = src/libzmq.la
477

478 479
tests_test_term_endpoint_SOURCES = tests/test_term_endpoint.cpp
tests_test_term_endpoint_LDADD = src/libzmq.la
480

481 482
tests_test_srcfd_SOURCES = tests/test_srcfd.cpp
tests_test_srcfd_LDADD = src/libzmq.la
483

484 485
tests_test_monitor_SOURCES = tests/test_monitor.cpp
tests_test_monitor_LDADD = src/libzmq.la
486

487 488
tests_test_router_mandatory_SOURCES = tests/test_router_mandatory.cpp
tests_test_router_mandatory_LDADD = src/libzmq.la
489

490 491
tests_test_router_mandatory_hwm_SOURCES = tests/test_router_mandatory_hwm.cpp
tests_test_router_mandatory_hwm_LDADD = src/libzmq.la
492

493 494
tests_test_router_handover_SOURCES = tests/test_router_handover.cpp
tests_test_router_handover_LDADD = src/libzmq.la
495

496 497
tests_test_probe_router_SOURCES = tests/test_probe_router.cpp
tests_test_probe_router_LDADD = src/libzmq.la
498

499 500
tests_test_stream_SOURCES = tests/test_stream.cpp
tests_test_stream_LDADD = src/libzmq.la
501

502 503
tests_test_stream_empty_SOURCES = tests/test_stream_empty.cpp
tests_test_stream_empty_LDADD = src/libzmq.la
504

505 506
tests_test_stream_timeout_SOURCES = tests/test_stream_timeout.cpp
tests_test_stream_timeout_LDADD = src/libzmq.la
507

508 509
tests_test_stream_disconnect_SOURCES = tests/test_stream_disconnect.cpp
tests_test_stream_disconnect_LDADD = src/libzmq.la
510

511 512
tests_test_disconnect_inproc_SOURCES = tests/test_disconnect_inproc.cpp
tests_test_disconnect_inproc_LDADD = src/libzmq.la
513

Dylan Cali's avatar
Dylan Cali committed
514 515 516 517 518 519
tests_test_unbind_inproc_SOURCES = tests/test_unbind_inproc.cpp
tests_test_unbind_inproc_LDADD = src/libzmq.la

tests_test_unbind_wildcard_SOURCES = tests/test_unbind_wildcard.cpp
tests_test_unbind_wildcard_LDADD = src/libzmq.la

520 521
tests_test_ctx_options_SOURCES = tests/test_ctx_options.cpp
tests_test_ctx_options_LDADD = src/libzmq.la
522

523 524
tests_test_iov_SOURCES = tests/test_iov.cpp
tests_test_iov_LDADD = src/libzmq.la
525

526 527
tests_test_ctx_destroy_SOURCES = tests/test_ctx_destroy.cpp
tests_test_ctx_destroy_LDADD = src/libzmq.la
528

529 530
tests_test_security_null_SOURCES = tests/test_security_null.cpp
tests_test_security_null_LDADD = src/libzmq.la
531

532 533
tests_test_security_plain_SOURCES = tests/test_security_plain.cpp
tests_test_security_plain_LDADD = src/libzmq.la
534

535 536 537 538
tests_test_security_zap_SOURCES = \
	tests/test_security_zap.cpp \
	tests/testutil_security.hpp \
	tests/testutil.hpp
539 540
tests_test_security_zap_LDADD = src/libzmq.la

541 542
tests_test_spec_req_SOURCES = tests/test_spec_req.cpp
tests_test_spec_req_LDADD = src/libzmq.la
543

544 545
tests_test_spec_rep_SOURCES = tests/test_spec_rep.cpp
tests_test_spec_rep_LDADD = src/libzmq.la
546

547 548
tests_test_spec_dealer_SOURCES = tests/test_spec_dealer.cpp
tests_test_spec_dealer_LDADD = src/libzmq.la
549

550 551
tests_test_spec_router_SOURCES = tests/test_spec_router.cpp
tests_test_spec_router_LDADD = src/libzmq.la
552

553 554
tests_test_spec_pushpull_SOURCES = tests/test_spec_pushpull.cpp
tests_test_spec_pushpull_LDADD = src/libzmq.la
555

556 557
tests_test_req_correlate_SOURCES = tests/test_req_correlate.cpp
tests_test_req_correlate_LDADD = src/libzmq.la
558

559 560
tests_test_req_relaxed_SOURCES = tests/test_req_relaxed.cpp
tests_test_req_relaxed_LDADD = src/libzmq.la
561

562 563
tests_test_conflate_SOURCES = tests/test_conflate.cpp
tests_test_conflate_LDADD = src/libzmq.la
564

565 566
tests_test_inproc_connect_SOURCES = tests/test_inproc_connect.cpp
tests_test_inproc_connect_LDADD = src/libzmq.la
567

568 569
tests_test_issue_566_SOURCES = tests/test_issue_566.cpp
tests_test_issue_566_LDADD = src/libzmq.la
570

571 572
tests_test_proxy_SOURCES = tests/test_proxy.cpp
tests_test_proxy_LDADD = src/libzmq.la
573

574 575 576
tests_test_proxy_single_socket_SOURCES = tests/test_proxy_single_socket.cpp
tests_test_proxy_single_socket_LDADD = src/libzmq.la

577 578 579
tests_test_proxy_terminate_SOURCES = tests/test_proxy_terminate.cpp
tests_test_proxy_terminate_LDADD = src/libzmq.la

580
tests_test_getsockopt_memset_SOURCES = tests/test_getsockopt_memset.cpp
581
tests_test_getsockopt_memset_LDADD = src/libzmq.la
582

583 584
tests_test_many_sockets_SOURCES = tests/test_many_sockets.cpp
tests_test_many_sockets_LDADD = src/libzmq.la
585

586 587
tests_test_diffserv_SOURCES = tests/test_diffserv.cpp
tests_test_diffserv_LDADD = src/libzmq.la
588

589 590
tests_test_connect_rid_SOURCES = tests/test_connect_rid.cpp
tests_test_connect_rid_LDADD = src/libzmq.la
591

592 593
tests_test_bind_src_address_SOURCES = tests/test_bind_src_address.cpp
tests_test_bind_src_address_LDADD = src/libzmq.la
594

595 596
tests_test_metadata_SOURCES = tests/test_metadata.cpp
tests_test_metadata_LDADD = src/libzmq.la
597

598 599
tests_test_capabilities_SOURCES = tests/test_capabilities.cpp
tests_test_capabilities_LDADD = src/libzmq.la
600

601 602
tests_test_xpub_nodrop_SOURCES = tests/test_xpub_nodrop.cpp
tests_test_xpub_nodrop_LDADD = src/libzmq.la
603

604 605 606
tests_test_xpub_manual_SOURCES = tests/test_xpub_manual.cpp
tests_test_xpub_manual_LDADD = src/libzmq.la

somdoron's avatar
somdoron committed
607 608 609
tests_test_xpub_welcome_msg_SOURCES = tests/test_xpub_welcome_msg.cpp
tests_test_xpub_welcome_msg_LDADD = src/libzmq.la

610 611 612
tests_test_atomics_SOURCES = tests/test_atomics.cpp
tests_test_atomics_LDADD = src/libzmq.la

613 614
tests_test_sockopt_hwm_SOURCES = tests/test_sockopt_hwm.cpp
tests_test_sockopt_hwm_LDADD = src/libzmq.la
615

616 617 618
tests_test_setsockopt_SOURCES = tests/test_setsockopt.cpp
tests_test_setsockopt_LDADD = src/libzmq.la

Jonathan Reams's avatar
Jonathan Reams committed
619 620
tests_test_heartbeats_SOURCES = tests/test_heartbeats.cpp
tests_test_heartbeats_LDADD = src/libzmq.la
somdoron's avatar
somdoron committed
621

622 623 624
tests_test_stream_exceeds_buffer_SOURCES = tests/test_stream_exceeds_buffer.cpp
tests_test_stream_exceeds_buffer_LDADD = src/libzmq.la

625 626 627
tests_test_pub_invert_matching_SOURCES = tests/test_pub_invert_matching.cpp
tests_test_pub_invert_matching_LDADD = src/libzmq.la

628 629 630
tests_test_bind_after_connect_tcp_SOURCES = tests/test_bind_after_connect_tcp.cpp
tests_test_bind_after_connect_tcp_LDADD = src/libzmq.la

631 632 633 634 635 636
tests_test_base85_SOURCES = tests/test_base85.cpp
tests_test_base85_LDADD = src/libzmq.la

tests_test_sodium_SOURCES = tests/test_sodium.cpp
tests_test_sodium_LDADD = src/libzmq.la

637 638 639 640 641 642 643
if HAVE_CURVE

test_apps += \
	tests/test_security_curve

tests_test_security_curve_SOURCES = \
	tests/test_security_curve.cpp \
644
	tests/testutil_security.hpp \
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659
	tests/testutil.hpp \
	src/curve_client_tools.hpp \
	src/clock.hpp \
	src/clock.cpp \
	src/random.hpp \
	src/random.cpp \
	src/err.hpp \
	src/err.cpp

if USE_TWEETNACL
tests_test_security_curve_SOURCES += \
	src/tweetnacl.c
endif

tests_test_security_curve_LDADD = \
660 661 662
	src/libzmq.la $(LIBUNWIND_LIBS)
tests_test_security_curve_CPPFLAGS = \
	${LIBUNWIND_CFLAGS}
663 664

if USE_LIBSODIUM
665 666
tests_test_security_curve_CPPFLAGS += \
	${sodium_CFLAGS}
667 668 669 670 671 672
tests_test_security_curve_LDADD += \
	${sodium_LIBS}
endif

endif

673
if !ON_MINGW
674
if !ON_CYGWIN
675
test_apps += \
676
	tests/test_shutdown_stress \
677
	tests/test_ipc_wildcard \
678 679
	tests/test_pair_ipc \
	tests/test_reqrep_ipc \
680 681
	tests/test_use_fd_ipc \
	tests/test_use_fd_tcp \
682
	tests/test_zmq_poll_fd \
683 684
	tests/test_timeo \
	tests/test_filter_ipc
685

686 687
tests_test_shutdown_stress_SOURCES = tests/test_shutdown_stress.cpp
tests_test_shutdown_stress_LDADD = src/libzmq.la
688

689 690 691
tests_test_ipc_wildcard_SOURCES = tests/test_ipc_wildcard.cpp
tests_test_ipc_wildcard_LDADD = src/libzmq.la

692
tests_test_pair_ipc_SOURCES = \
693 694
	tests/test_pair_ipc.cpp \
	tests/testutil.hpp
695
tests_test_pair_ipc_LDADD = src/libzmq.la
696

697
tests_test_reqrep_ipc_SOURCES = \
698 699
	tests/test_reqrep_ipc.cpp \
	tests/testutil.hpp
700
tests_test_reqrep_ipc_LDADD = src/libzmq.la
701

702 703
tests_test_timeo_SOURCES = tests/test_timeo.cpp
tests_test_timeo_LDADD = src/libzmq.la
704

705 706
tests_test_filter_ipc_SOURCES = tests/test_filter_ipc.cpp
tests_test_filter_ipc_LDADD = src/libzmq.la
707

708 709
tests_test_use_fd_ipc_SOURCES = \
	tests/test_use_fd_ipc.cpp \
710
	tests/testutil.hpp
711
tests_test_use_fd_ipc_LDADD = src/libzmq.la
712

713 714
tests_test_use_fd_tcp_SOURCES = \
	tests/test_use_fd_tcp.cpp \
715
	tests/testutil.hpp
716
tests_test_use_fd_tcp_LDADD = src/libzmq.la
717

718 719 720
tests_test_zmq_poll_fd_SOURCES = tests/test_zmq_poll_fd.cpp
tests_test_zmq_poll_fd_LDADD = src/libzmq.la

721
if HAVE_FORK
722
if !VALGRIND_ENABLED
723
test_apps += tests/test_fork
724

725 726
tests_test_fork_SOURCES = tests/test_fork.cpp
tests_test_fork_LDADD = src/libzmq.la
727

728
endif
729
endif
730 731 732 733 734
endif
endif

if BUILD_TIPC
test_apps += \
735 736 737 738 739 740 741 742
	tests/test_connect_delay_tipc \
	tests/test_pair_tipc \
	tests/test_reqrep_device_tipc \
	tests/test_reqrep_tipc \
	tests/test_router_mandatory_tipc \
	tests/test_shutdown_stress_tipc \
	tests/test_sub_forward_tipc \
	tests/test_term_endpoint_tipc
743

744 745
tests_test_connect_delay_tipc_SOURCES = tests/test_connect_delay_tipc.cpp
tests_test_connect_delay_tipc_LDADD = src/libzmq.la
746

747 748
tests_test_pair_tipc_SOURCES = tests/test_pair_tipc.cpp
tests_test_pair_tipc_LDADD = src/libzmq.la
749

750 751
tests_test_reqrep_device_tipc_SOURCES = tests/test_reqrep_device_tipc.cpp
tests_test_reqrep_device_tipc_LDADD = src/libzmq.la
752

753 754
tests_test_reqrep_tipc_SOURCES = tests/test_reqrep_tipc.cpp
tests_test_reqrep_tipc_LDADD = src/libzmq.la
755

756 757
tests_test_router_mandatory_tipc_SOURCES = tests/test_router_mandatory_tipc.cpp
tests_test_router_mandatory_tipc_LDADD = src/libzmq.la
758

759 760
tests_test_shutdown_stress_tipc_SOURCES = tests/test_shutdown_stress_tipc.cpp
tests_test_shutdown_stress_tipc_LDADD = src/libzmq.la
761

762 763
tests_test_sub_forward_tipc_SOURCES = tests/test_sub_forward_tipc.cpp
tests_test_sub_forward_tipc_LDADD = src/libzmq.la
764

765 766
tests_test_term_endpoint_tipc_SOURCES = tests/test_term_endpoint_tipc.cpp
tests_test_term_endpoint_tipc_LDADD = src/libzmq.la
767 768 769

endif

770 771 772 773 774 775 776 777
if BUILD_GSSAPI
test_apps += tests/test_security_gssapi

tests_test_security_gssapi_SOURCES = tests/test_security_gssapi.cpp
tests_test_security_gssapi_LDADD = src/libzmq.la

endif

778
if ON_LINUX
779 780
test_apps += tests/test_abstract_ipc \
		tests/test_many_sockets
781

782 783
tests_test_abstract_ipc_SOURCES = tests/test_abstract_ipc.cpp
tests_test_abstract_ipc_LDADD = src/libzmq.la
784

785 786
endif

Ilya Kulakov's avatar
Ilya Kulakov committed
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801
if HAVE_VMCI
test_apps += test_pair_vmci test_reqrep_vmci

test_pair_vmci_SOURCES = tests/test_pair_vmci.cpp
test_pair_vmci_LDADD = libzmq.la
test_pair_vmci_LDFLAGS = @LIBZMQ_VMCI_LDFLAGS@
test_pair_vmci_CXXFLAGS = @LIBZMQ_VMCI_CXXFLAGS@

test_reqrep_vmci_SOURCES = tests/test_reqrep_vmci.cpp
test_reqrep_vmci_LDADD = libzmq.la
test_reqrep_vmci_LDFLAGS = @LIBZMQ_VMCI_LDFLAGS@
test_reqrep_vmci_CXXFLAGS = @LIBZMQ_VMCI_CXXFLAGS@

endif

802
if ENABLE_DRAFTS
803 804
test_apps += tests/test_poller \
	tests/test_client_server \
805
	tests/test_thread_safe \
806 807
	tests/test_timers \
	tests/test_radio_dish \
808
	tests/test_udp \
Bitiquinho's avatar
Bitiquinho committed
809 810
	tests/test_scatter_gather \
	tests/test_dgram
811

812 813 814
tests_test_poller_SOURCES = tests/test_poller.cpp
tests_test_poller_LDADD = src/libzmq.la

815 816 817 818 819
tests_test_client_server_SOURCES = tests/test_client_server.cpp
tests_test_client_server_LDADD = src/libzmq.la

tests_test_thread_safe_SOURCES = tests/test_thread_safe.cpp
tests_test_thread_safe_LDADD = src/libzmq.la
820 821 822

tests_test_timers_SOURCES = tests/test_timers.cpp
tests_test_timers_LDADD = src/libzmq.la
823 824 825 826 827 828

tests_test_radio_dish_SOURCES = tests/test_radio_dish.cpp
tests_test_radio_dish_LDADD = src/libzmq.la

tests_test_udp_SOURCES = tests/test_udp.cpp
tests_test_udp_LDADD = src/libzmq.la
829 830 831

tests_test_scatter_gather_SOURCES = tests/test_scatter_gather.cpp
tests_test_scatter_gather_LDADD = src/libzmq.la
Bitiquinho's avatar
Bitiquinho committed
832 833 834

tests_test_dgram_SOURCES = tests/test_dgram.cpp
tests_test_dgram_LDADD = src/libzmq.la
835 836
endif

837 838 839 840
check_PROGRAMS = ${test_apps}

#  Run the test cases
TESTS = $(test_apps)
841
XFAIL_TESTS =
842 843

if !ON_LINUX
844
XFAIL_TESTS += tests/test_abstract_ipc
845
endif
846

847 848 849 850 851
if ON_GNU
XFAIL_TESTS += test_ipc_wildcard \
		test_term_endpoint
endif

852
EXTRA_DIST = \
853
	FindSodium.cmake \
854
	CMakeLists.txt \
855 856
	autogen.sh	\
	version.sh	\
857 858
	src/libzmq.pc.cmake.in \
	src/libzmq.vers \
859 860
	src/version.rc.in \
	tests/CMakeLists.txt \
861
	tools/curve_keygen.cpp
862

863
MAINTAINERCLEANFILES = \
864 865 866
	$(srcdir)/aclocal.m4 \
	$(srcdir)/autom4te.cache \
	$(srcdir)/configure \
867
	`find "$(srcdir)" -type f -name Makefile.in -print`
malosek's avatar
malosek committed
868

869 870
@CODE_COVERAGE_RULES@

871
dist-hook:
872
	-rm $(distdir)/src/platform.hpp
873 874 875 876 877 878 879 880 881 882 883 884
	@if test -d "$(srcdir)/.git"; \
	then \
		echo Creating ChangeLog && \
		( cd "$(top_srcdir)" && \
		  echo '# Generated by Makefile. Do not edit.'; echo; \
		  $(top_srcdir)/config/missing --run git log --stat ) > ChangeLog.tmp \
		  && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
		  || ( rm -f ChangeLog.tmp ; \
		       echo Failed to generate ChangeLog >&2 ); \
	else \
		echo A git clone is required to generate a ChangeLog >&2; \
	fi
885

886 887
maintainer-clean-local:
	-rm -rf $(top_srcdir)/config
888 889

@VALGRIND_CHECK_RULES@
890 891

VALGRIND_SUPPRESSIONS_FILES = builds/valgrind/valgrind.supp