etc/services - sync with NetBSD-8
[minix.git] / external / bsd / libevent / dist / test / Makefile.am
blob0253a49170dc35b1aad367230073de64979e45cc
1 # test/Makefile.am for libevent
2 # Copyright 2000-2007 Niels Provos
3 # Copyright 2007-2012 Niels Provos and Nick Mathewson
5 # See LICENSE for copying information.
7 AUTOMAKE_OPTIONS = foreign
9 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -I$(top_srcdir)/include -I../include -DTINYTEST_LOCAL
11 EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c rpcgen_wrapper.sh test.sh
13 noinst_PROGRAMS = test-init test-eof test-weof test-time \
14         bench bench_cascade bench_http bench_httpclient test-ratelim \
15         test-changelist
16 if BUILD_REGRESS
17 noinst_PROGRAMS += regress
18 endif
19 EXTRA_PROGRAMS = regress
20 noinst_HEADERS = tinytest.h tinytest_macros.h regress.h tinytest_local.h
22 # We need to copy this file, since automake doesn't want us to use top_srcdir
23 # in TESTS.
24 TESTS = test-script.sh
26 test-script.sh: test.sh
27         cp $< $@
29 DISTCLEANFILES = test-script.sh
31 BUILT_SOURCES =
32 if BUILD_REGRESS
33 BUILT_SOURCES += regress.gen.c regress.gen.h
34 endif
36 test_init_SOURCES = test-init.c
37 test_init_LDADD = ../libevent_core.la
38 test_eof_SOURCES = test-eof.c
39 test_eof_LDADD = ../libevent_core.la
40 test_changelist_SOURCES = test-changelist.c
41 test_changelist_LDADD = ../libevent_core.la
42 test_weof_SOURCES = test-weof.c
43 test_weof_LDADD = ../libevent_core.la
44 test_time_SOURCES = test-time.c
45 test_time_LDADD = ../libevent_core.la
46 test_ratelim_SOURCES = test-ratelim.c
47 test_ratelim_LDADD = ../libevent_core.la -lm
49 regress_SOURCES = regress.c regress_buffer.c regress_http.c regress_dns.c \
50         regress_testutils.c regress_testutils.h \
51         regress_rpc.c regress.gen.c regress.gen.h regress_et.c \
52         regress_bufferevent.c regress_listener.c \
53         regress_util.c tinytest.c regress_main.c regress_minheap.c \
54         $(regress_thread_SOURCES) $(regress_zlib_SOURCES)
55 if PTHREADS
56 regress_thread_SOURCES = regress_thread.c
57 PTHREAD_LIBS += ../libevent_pthreads.la
58 endif
59 if BUILD_WIN32
60 regress_thread_SOURCES = regress_thread.c
61 endif
62 if ZLIB_REGRESS
63 regress_zlib_SOURCES = regress_zlib.c
64 endif
65 if BUILD_WIN32
66 regress_SOURCES += regress_iocp.c
67 endif
69 regress_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
70 regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS)
71 regress_LDFLAGS = $(PTHREAD_CFLAGS)
73 if OPENSSL
74 regress_SOURCES += regress_ssl.c
75 regress_LDADD += ../libevent_openssl.la -lssl -lcrypto ${OPENSSL_LIBADD}
76 endif
78 bench_SOURCES = bench.c
79 bench_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent.la
80 bench_cascade_SOURCES = bench_cascade.c
81 bench_cascade_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent.la
82 bench_http_SOURCES = bench_http.c
83 bench_http_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent.la
84 bench_httpclient_SOURCES = bench_httpclient.c
85 bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) ../libevent_core.la
87 regress.gen.c regress.gen.h: rpcgen-attempted
89 rpcgen-attempted: $(srcdir)/regress.rpc $(srcdir)/../event_rpcgen.py $(srcdir)/rpcgen_wrapper.sh
90         date -u > $@
91         if $(srcdir)/rpcgen_wrapper.sh $(srcdir); then \
92            echo "rpcgen okay"; \
93         else \
94            echo "No Python installed; stubbing out RPC test." >&2; \
95            echo " "> regress.gen.c; \
96            echo "#define NO_PYTHON_EXISTS" > regress.gen.h; \
97         fi
99 CLEANFILES = rpcgen-attempted
101 DISTCLEANFILES += *~
103 verify: check
105 bench test-init test-eof test-weof test-time test-changelist: ../libevent.la