fixing #3610
[oweals/gnunet.git] / src / core / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 pkgcfgdir= $(pkgdatadir)/config.d/
4
5 libexecdir= $(pkglibdir)/libexec/
6
7 pkgcfg_DATA = \
8   core.conf
9
10 if MINGW
11   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
12 endif
13
14 if USE_COVERAGE
15   AM_CFLAGS = --coverage -O0
16   XLIB = -lgcov
17 endif
18
19
20 lib_LTLIBRARIES = \
21   libgnunetcore.la
22
23 libgnunetcore_la_SOURCES = \
24   core_api.c core.h \
25   core_api_mq.c \
26   core_api_monitor_peers.c
27 libgnunetcore_la_LIBADD = \
28   $(top_builddir)/src/util/libgnunetutil.la \
29   $(GN_LIBINTL) $(XLIB)
30 libgnunetcore_la_LDFLAGS = \
31   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
32   -version-info 0:1:0
33
34
35 libexec_PROGRAMS = \
36  gnunet-service-core
37
38 bin_PROGRAMS = \
39  gnunet-core
40
41 gnunet_service_core_SOURCES = \
42  gnunet-service-core.c gnunet-service-core.h \
43  gnunet-service-core_clients.c gnunet-service-core_clients.h \
44  gnunet-service-core_neighbours.c gnunet-service-core_neighbours.h \
45  gnunet-service-core_kx.c gnunet-service-core_kx.h \
46  gnunet-service-core_sessions.c gnunet-service-core_sessions.h \
47  gnunet-service-core_typemap.c gnunet-service-core_typemap.h
48 gnunet_service_core_LDADD = \
49   $(top_builddir)/src/statistics/libgnunetstatistics.la \
50   $(top_builddir)/src/transport/libgnunettransport.la \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(GN_LIBINTL) $(Z_LIBS)
53
54
55 gnunet_core_SOURCES = \
56  gnunet-core.c
57 gnunet_core_LDADD = \
58   libgnunetcore.la \
59   $(top_builddir)/src/util/libgnunetutil.la
60
61 if HAVE_TESTING
62   TESTING_TESTS = test_core_api_send_to_self test_core_api_mq
63 endif
64
65 check_PROGRAMS = \
66  test_core_api_start_only \
67  test_core_api \
68  test_core_api_reliability \
69  test_core_quota_compliance_symmetric \
70  test_core_quota_compliance_asymmetric_send_limited \
71  test_core_quota_compliance_asymmetric_recv_limited \
72  $(TESTING_TESTS)
73
74 if ENABLE_TEST_RUN
75 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
76 TESTS = $(check_PROGRAMS)
77 endif
78
79 test_core_api_SOURCES = \
80  test_core_api.c
81 test_core_api_LDADD = \
82  libgnunetcore.la \
83  $(top_builddir)/src/transport/libgnunettransport.la \
84  $(top_builddir)/src/util/libgnunetutil.la
85
86 test_core_api_reliability_SOURCES = \
87  test_core_api_reliability.c
88 test_core_api_reliability_LDADD = \
89  libgnunetcore.la \
90  $(top_builddir)/src/transport/libgnunettransport.la \
91  $(top_builddir)/src/util/libgnunetutil.la
92
93 test_core_api_send_to_self_SOURCES = \
94  test_core_api_send_to_self.c
95 test_core_api_send_to_self_LDADD = \
96  libgnunetcore.la \
97  $(top_builddir)/src/testing/libgnunettesting.la \
98  $(top_builddir)/src/transport/libgnunettransport.la \
99  $(top_builddir)/src/util/libgnunetutil.la
100
101 test_core_api_mq_SOURCES = \
102  test_core_api_mq.c
103 test_core_api_mq_LDADD = \
104  libgnunetcore.la \
105  $(top_builddir)/src/testing/libgnunettesting.la \
106  $(top_builddir)/src/transport/libgnunettransport.la \
107  $(top_builddir)/src/util/libgnunetutil.la
108
109 test_core_api_start_only_SOURCES = \
110  test_core_api_start_only.c
111 test_core_api_start_only_LDADD = \
112  $(top_builddir)/src/testing/libgnunettesting.la \
113  libgnunetcore.la \
114  $(top_builddir)/src/util/libgnunetutil.la
115
116 test_core_quota_compliance_symmetric_SOURCES = \
117  test_core_quota_compliance.c
118 test_core_quota_compliance_symmetric_LDADD = \
119  libgnunetcore.la \
120  $(top_builddir)/src/transport/libgnunettransport.la \
121  $(top_builddir)/src/util/libgnunetutil.la \
122  $(top_builddir)/src/statistics/libgnunetstatistics.la
123
124 test_core_quota_compliance_asymmetric_send_limited_SOURCES = \
125  test_core_quota_compliance.c
126 test_core_quota_compliance_asymmetric_send_limited_LDADD = \
127  libgnunetcore.la \
128  $(top_builddir)/src/transport/libgnunettransport.la \
129  $(top_builddir)/src/util/libgnunetutil.la \
130  $(top_builddir)/src/statistics/libgnunetstatistics.la
131
132 test_core_quota_compliance_asymmetric_recv_limited_SOURCES = \
133  test_core_quota_compliance.c
134 test_core_quota_compliance_asymmetric_recv_limited_LDADD = \
135  libgnunetcore.la \
136  $(top_builddir)/src/transport/libgnunettransport.la \
137  $(top_builddir)/src/util/libgnunetutil.la \
138  $(top_builddir)/src/statistics/libgnunetstatistics.la
139
140 EXTRA_DIST = \
141   test_core_defaults.conf \
142   test_core_api_data.conf \
143   test_core_api_peer1.conf \
144   test_core_api_peer2.conf \
145   test_core_api_send_to_self.conf \
146   test_core_quota_asymmetric_recv_limited_peer1.conf \
147   test_core_quota_asymmetric_recv_limited_peer2.conf \
148   test_core_quota_asymmetric_send_limit_peer1.conf \
149   test_core_quota_asymmetric_send_limit_peer2.conf \
150   test_core_quota_peer1.conf \
151   test_core_quota_peer2.conf