aac1d5fcc6a03c312a6854cc06518d9542930ea7
[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_monitor_peers.c
26 libgnunetcore_la_LIBADD = \
27   $(top_builddir)/src/util/libgnunetutil.la \
28   $(GN_LIBINTL) $(XLIB)
29 libgnunetcore_la_LDFLAGS = \
30   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
31   -version-info 0:1:0
32
33
34 libexec_PROGRAMS = \
35  gnunet-service-core 
36
37 bin_PROGRAMS = \
38  gnunet-core
39
40 gnunet_service_core_SOURCES = \
41  gnunet-service-core.c gnunet-service-core.h \
42  gnunet-service-core_clients.c gnunet-service-core_clients.h \
43  gnunet-service-core_neighbours.c gnunet-service-core_neighbours.h \
44  gnunet-service-core_kx.c gnunet-service-core_kx.h \
45  gnunet-service-core_sessions.c gnunet-service-core_sessions.h \
46  gnunet-service-core_typemap.c gnunet-service-core_typemap.h
47 gnunet_service_core_LDADD = \
48   $(top_builddir)/src/statistics/libgnunetstatistics.la \
49   $(top_builddir)/src/transport/libgnunettransport.la \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(GN_LIBINTL) $(Z_LIBS)
52
53
54 gnunet_core_SOURCES = \
55  gnunet-core.c         
56 gnunet_core_LDADD = \
57   libgnunetcore.la \
58   $(top_builddir)/src/util/libgnunetutil.la
59
60 if HAVE_TESTING
61   TESTING_TESTS = test_core_api_send_to_self test_core_api_mq
62 endif
63
64 check_PROGRAMS = \
65  test_core_api_start_only \
66  test_core_api \
67  test_core_api_reliability \
68  test_core_quota_compliance_symmetric \
69  test_core_quota_compliance_asymmetric_send_limited \
70  test_core_quota_compliance_asymmetric_recv_limited \
71  $(TESTING_TESTS)
72
73 if ENABLE_TEST_RUN
74 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
75 TESTS = $(check_PROGRAMS)
76 endif
77
78 test_core_api_SOURCES = \
79  test_core_api.c
80 test_core_api_LDADD = \
81  libgnunetcore.la \
82  $(top_builddir)/src/transport/libgnunettransport.la \
83  $(top_builddir)/src/util/libgnunetutil.la  
84
85 test_core_api_reliability_SOURCES = \
86  test_core_api_reliability.c
87 test_core_api_reliability_LDADD = \
88  libgnunetcore.la \
89  $(top_builddir)/src/transport/libgnunettransport.la \
90  $(top_builddir)/src/util/libgnunetutil.la
91
92 test_core_api_send_to_self_SOURCES = \
93  test_core_api_send_to_self.c
94 test_core_api_send_to_self_LDADD = \
95  libgnunetcore.la \
96  $(top_builddir)/src/testing/libgnunettesting.la \
97  $(top_builddir)/src/transport/libgnunettransport.la \
98  $(top_builddir)/src/util/libgnunetutil.la
99
100 test_core_api_mq_SOURCES = \
101  test_core_api_mq.c
102 test_core_api_mq_LDADD = \
103  libgnunetcore.la \
104  $(top_builddir)/src/testing/libgnunettesting.la \
105  $(top_builddir)/src/transport/libgnunettransport.la \
106  $(top_builddir)/src/util/libgnunetutil.la
107
108 test_core_api_start_only_SOURCES = \
109  test_core_api_start_only.c
110 test_core_api_start_only_LDADD = \
111  $(top_builddir)/src/testing/libgnunettesting.la \
112  libgnunetcore.la \
113  $(top_builddir)/src/util/libgnunetutil.la
114
115 test_core_quota_compliance_symmetric_SOURCES = \
116  test_core_quota_compliance.c
117 test_core_quota_compliance_symmetric_LDADD = \
118  libgnunetcore.la \
119  $(top_builddir)/src/transport/libgnunettransport.la \
120  $(top_builddir)/src/util/libgnunetutil.la \
121  $(top_builddir)/src/statistics/libgnunetstatistics.la
122
123 test_core_quota_compliance_asymmetric_send_limited_SOURCES = \
124  test_core_quota_compliance.c
125 test_core_quota_compliance_asymmetric_send_limited_LDADD = \
126  libgnunetcore.la \
127  $(top_builddir)/src/transport/libgnunettransport.la \
128  $(top_builddir)/src/util/libgnunetutil.la \
129  $(top_builddir)/src/statistics/libgnunetstatistics.la
130
131 test_core_quota_compliance_asymmetric_recv_limited_SOURCES = \
132  test_core_quota_compliance.c
133 test_core_quota_compliance_asymmetric_recv_limited_LDADD = \
134  libgnunetcore.la \
135  $(top_builddir)/src/transport/libgnunettransport.la \
136  $(top_builddir)/src/util/libgnunetutil.la \
137  $(top_builddir)/src/statistics/libgnunetstatistics.la
138
139 EXTRA_DIST = \
140   test_core_defaults.conf \
141   test_core_api_data.conf \
142   test_core_api_peer1.conf \
143   test_core_api_peer2.conf \
144   test_core_api_send_to_self.conf \
145   test_core_quota_asymmetric_recv_limited_peer1.conf \
146   test_core_quota_asymmetric_recv_limited_peer2.conf \
147   test_core_quota_asymmetric_send_limit_peer1.conf \
148   test_core_quota_asymmetric_send_limit_peer2.conf \
149   test_core_quota_peer1.conf \
150   test_core_quota_peer2.conf