-fixing #2405
[oweals/gnunet.git] / src / mesh / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5 endif
6
7 if USE_COVERAGE
8   AM_CFLAGS = --coverage -O0
9   XLIB = -lgcov
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 pkgcfg_DATA = \
15   mesh.conf
16
17 AM_CLFAGS = -g
18
19 bin_PROGRAMS = \
20  gnunet-service-mesh  gnunet-service-mesh_new
21
22 lib_LTLIBRARIES = \
23   libgnunetmesh.la
24
25 gnunet_service_mesh_SOURCES = \
26  gnunet-service-mesh.c \
27  mesh_tunnel_tree.c mesh_tunnel_tree.h
28 gnunet_service_mesh_LDADD = \
29   $(top_builddir)/src/core/libgnunetcore.la\
30   $(top_builddir)/src/dht/libgnunetdht.la \
31   $(top_builddir)/src/util/libgnunetutil.la
32  gnunet_service_mesh_DEPENDENCIES = \
33   $(top_builddir)/src/core/libgnunetcore.la\
34   $(top_builddir)/src/dht/libgnunetdht.la \
35   $(top_builddir)/src/util/libgnunetutil.la
36
37 gnunet_service_mesh_new_SOURCES = \
38  gnunet-service-mesh_new.c \
39  mesh_tunnel_tree.c mesh_tunnel_tree.h
40 gnunet_service_mesh_new_LDADD = \
41   $(top_builddir)/src/core/libgnunetcore.la\
42   $(top_builddir)/src/dht/libgnunetdht.la \
43   $(top_builddir)/src/util/libgnunetutil.la
44  gnunet_service_mesh_new_DEPENDENCIES = \
45   $(top_builddir)/src/core/libgnunetcore.la\
46   $(top_builddir)/src/dht/libgnunetdht.la \
47   $(top_builddir)/src/util/libgnunetutil.la
48
49 libgnunetmesh_la_SOURCES = \
50   mesh_api.c mesh.h mesh_protocol.h
51 libgnunetmesh_la_LIBADD = \
52   $(top_builddir)/src/util/libgnunetutil.la \
53   $(XLIB) \
54   $(LTLIBINTL)
55 libgnunetmesh_la_LDFLAGS = \
56   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
57   -version-info 1:0:0
58
59 check_PROGRAMS = \
60  test_mesh_api \
61  test_mesh_tree_api \
62  test_mesh_local_1 \
63  test_mesh_local_2 \
64  test_mesh_2dtorus \
65  test_mesh_small_unicast \
66  test_mesh_small_multicast \
67  test_mesh_small_speed \
68  test_mesh_small_speed_ack
69
70 test_mesh_api_SOURCES = \
71  test_mesh_api.c
72 test_mesh_api_LDADD = \
73  $(top_builddir)/src/util/libgnunetutil.la \
74  $(top_builddir)/src/mesh/libgnunetmesh.la
75 test_mesh_api_DEPENDENCIES = \
76   libgnunetmesh.la \
77    $(top_builddir)/src/util/libgnunetutil.la
78
79 test_mesh_tree_api_SOURCES = \
80  test_mesh_tree_api.c
81 test_mesh_tree_api_LDADD = \
82  $(top_builddir)/src/util/libgnunetutil.la \
83   $(top_builddir)/src/dht/libgnunetdht.la
84 test_mesh_tree_api_DEPENDENCIES = \
85   libgnunetmesh.la \
86   $(top_builddir)/src/dht/libgnunetdht.la
87
88 test_mesh_local_1_SOURCES = \
89  test_mesh_local_1.c
90 test_mesh_local_1_LDADD = \
91  $(top_builddir)/src/util/libgnunetutil.la \
92  $(top_builddir)/src/mesh/libgnunetmesh.la
93 test_mesh_local_1_DEPENDENCIES = \
94   libgnunetmesh.la
95
96 test_mesh_local_2_SOURCES = \
97  test_mesh_local_2.c
98 test_mesh_local_2_LDADD = \
99  $(top_builddir)/src/util/libgnunetutil.la \
100  $(top_builddir)/src/mesh/libgnunetmesh.la
101 test_mesh_local_2_DEPENDENCIES = \
102   libgnunetmesh.la
103
104 test_mesh_2dtorus_SOURCES = \
105  test_mesh_2dtorus.c
106 test_mesh_2dtorus_LDADD = \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   $(top_builddir)/src/testing/libgnunettesting.la
109
110 test_mesh_small_unicast_SOURCES = \
111  test_mesh_small.c
112 test_mesh_small_unicast_LDADD = \
113   $(top_builddir)/src/mesh/libgnunetmesh.la \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(top_builddir)/src/testing/libgnunettesting.la
116 test_mesh_small_unicast_DEPENDENCIES = \
117   libgnunetmesh.la
118
119 test_mesh_small_multicast_SOURCES = \
120  test_mesh_small.c
121 test_mesh_small_multicast_LDADD = \
122   $(top_builddir)/src/mesh/libgnunetmesh.la \
123   $(top_builddir)/src/util/libgnunetutil.la \
124   $(top_builddir)/src/testing/libgnunettesting.la
125 test_mesh_small_multicast_DEPENDENCIES = \
126   libgnunetmesh.la
127
128 test_mesh_small_speed_SOURCES = \
129  test_mesh_small.c
130 test_mesh_small_speed_LDADD = \
131   $(top_builddir)/src/mesh/libgnunetmesh.la \
132   $(top_builddir)/src/util/libgnunetutil.la \
133   $(top_builddir)/src/testing/libgnunettesting.la
134 test_mesh_small_speed_DEPENDENCIES = \
135   libgnunetmesh.la
136
137 test_mesh_small_speed_ack_SOURCES = \
138  test_mesh_small.c
139 test_mesh_small_speed_ack_LDADD = \
140   $(top_builddir)/src/mesh/libgnunetmesh.la \
141   $(top_builddir)/src/util/libgnunetutil.la \
142   $(top_builddir)/src/testing/libgnunettesting.la
143 test_mesh_small_speed_ack_DEPENDENCIES = \
144   libgnunetmesh.la
145
146 if ENABLE_TEST_RUN
147 TESTS = test_mesh_api test_mesh_tree_api test_mesh_local_1 test_mesh_local_2 \
148  test_mesh_2dtorus test_mesh_small_unicast test_mesh_small_multicast
149 endif
150
151 EXTRA_DIST = \
152   test_mesh.conf \
153   test_mesh_2dtorus.conf \
154   test_mesh_small.conf \
155   test_mesh_path.conf