uncrustify as demanded.
[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_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_kx.c gnunet-service-core_kx.h \
44  gnunet-service-core_sessions.c gnunet-service-core_sessions.h \
45  gnunet-service-core_typemap.c gnunet-service-core_typemap.h
46 gnunet_service_core_LDADD = \
47   $(top_builddir)/src/statistics/libgnunetstatistics.la \
48   $(top_builddir)/src/transport/libgnunettransport.la \
49   $(top_builddir)/src/util/libgnunetutil.la \
50   $(GN_LIBINTL) $(Z_LIBS)
51
52
53 gnunet_core_SOURCES = \
54  gnunet-core.c
55 gnunet_core_LDADD = \
56   libgnunetcore.la \
57   $(top_builddir)/src/util/libgnunetutil.la
58
59 if HAVE_TESTING
60   TESTING_TESTS = \
61     test_core_api_send_to_self
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;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
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/ats/libgnunetats.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/ats/libgnunetats.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_start_only_SOURCES = \
103  test_core_api_start_only.c
104 test_core_api_start_only_LDADD = \
105  $(top_builddir)/src/testing/libgnunettesting.la \
106  libgnunetcore.la \
107  $(top_builddir)/src/util/libgnunetutil.la
108
109 test_core_quota_compliance_symmetric_SOURCES = \
110  test_core_quota_compliance.c
111 test_core_quota_compliance_symmetric_LDADD = \
112  libgnunetcore.la \
113  $(top_builddir)/src/transport/libgnunettransport.la \
114  $(top_builddir)/src/ats/libgnunetats.la \
115  $(top_builddir)/src/util/libgnunetutil.la \
116  $(top_builddir)/src/statistics/libgnunetstatistics.la
117
118 test_core_quota_compliance_asymmetric_send_limited_SOURCES = \
119  test_core_quota_compliance.c
120 test_core_quota_compliance_asymmetric_send_limited_LDADD = \
121  libgnunetcore.la \
122  $(top_builddir)/src/transport/libgnunettransport.la \
123  $(top_builddir)/src/ats/libgnunetats.la \
124  $(top_builddir)/src/util/libgnunetutil.la \
125  $(top_builddir)/src/statistics/libgnunetstatistics.la
126
127 test_core_quota_compliance_asymmetric_recv_limited_SOURCES = \
128  test_core_quota_compliance.c
129 test_core_quota_compliance_asymmetric_recv_limited_LDADD = \
130  libgnunetcore.la \
131  $(top_builddir)/src/transport/libgnunettransport.la \
132  $(top_builddir)/src/ats/libgnunetats.la \
133  $(top_builddir)/src/util/libgnunetutil.la \
134  $(top_builddir)/src/statistics/libgnunetstatistics.la
135
136 EXTRA_DIST = \
137   test_core_defaults.conf \
138   test_core_api_data.conf \
139   test_core_api_peer1.conf \
140   test_core_api_peer2.conf \
141   test_core_api_send_to_self.conf \
142   test_core_quota_asymmetric_recv_limited_peer1.conf \
143   test_core_quota_asymmetric_recv_limited_peer2.conf \
144   test_core_quota_asymmetric_send_limit_peer1.conf \
145   test_core_quota_asymmetric_send_limit_peer2.conf \
146   test_core_quota_peer1.conf \
147   test_core_quota_peer2.conf