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