- Makefile for mesh_new service
[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 libgnunetmesh_la_LDFLAGS = \
55   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
56   -version-info 1:0:0
57
58 check_PROGRAMS = \
59  test_mesh_api \
60  test_mesh_tree_api \
61  test_mesh_local_1 \
62  test_mesh_local_2 \
63  test_mesh_2dtorus \
64  test_mesh_small_unicast \
65  test_mesh_small_multicast \
66  test_mesh_small_speed \
67  test_mesh_small_speed_ack
68
69 test_mesh_api_SOURCES = \
70  test_mesh_api.c
71 test_mesh_api_LDADD = \
72  $(top_builddir)/src/util/libgnunetutil.la \
73  $(top_builddir)/src/mesh/libgnunetmesh.la
74 test_mesh_api_DEPENDENCIES = \
75   libgnunetmesh.la \
76    $(top_builddir)/src/util/libgnunetutil.la
77
78 test_mesh_tree_api_SOURCES = \
79  test_mesh_tree_api.c
80 test_mesh_tree_api_LDADD = \
81  $(top_builddir)/src/util/libgnunetutil.la \
82   $(top_builddir)/src/dht/libgnunetdht.la
83 test_mesh_tree_api_DEPENDENCIES = \
84   libgnunetmesh.la \
85   $(top_builddir)/src/dht/libgnunetdht.la
86
87 test_mesh_local_1_SOURCES = \
88  test_mesh_local_1.c
89 test_mesh_local_1_LDADD = \
90  $(top_builddir)/src/util/libgnunetutil.la \
91  $(top_builddir)/src/mesh/libgnunetmesh.la
92 test_mesh_local_1_DEPENDENCIES = \
93   libgnunetmesh.la
94
95 test_mesh_local_2_SOURCES = \
96  test_mesh_local_2.c
97 test_mesh_local_2_LDADD = \
98  $(top_builddir)/src/util/libgnunetutil.la \
99  $(top_builddir)/src/mesh/libgnunetmesh.la
100 test_mesh_local_2_DEPENDENCIES = \
101   libgnunetmesh.la
102
103 test_mesh_2dtorus_SOURCES = \
104  test_mesh_2dtorus.c
105 test_mesh_2dtorus_LDADD = \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/testing/libgnunettesting.la
108
109 test_mesh_small_unicast_SOURCES = \
110  test_mesh_small.c
111 test_mesh_small_unicast_LDADD = \
112   $(top_builddir)/src/mesh/libgnunetmesh.la \
113   $(top_builddir)/src/util/libgnunetutil.la \
114   $(top_builddir)/src/testing/libgnunettesting.la
115 test_mesh_small_unicast_DEPENDENCIES = \
116   libgnunetmesh.la
117
118 test_mesh_small_multicast_SOURCES = \
119  test_mesh_small.c
120 test_mesh_small_multicast_LDADD = \
121   $(top_builddir)/src/mesh/libgnunetmesh.la \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/testing/libgnunettesting.la
124 test_mesh_small_multicast_DEPENDENCIES = \
125   libgnunetmesh.la
126
127 test_mesh_small_speed_SOURCES = \
128  test_mesh_small.c
129 test_mesh_small_speed_LDADD = \
130   $(top_builddir)/src/mesh/libgnunetmesh.la \
131   $(top_builddir)/src/util/libgnunetutil.la \
132   $(top_builddir)/src/testing/libgnunettesting.la
133 test_mesh_small_speed_DEPENDENCIES = \
134   libgnunetmesh.la
135
136 test_mesh_small_speed_ack_SOURCES = \
137  test_mesh_small.c
138 test_mesh_small_speed_ack_LDADD = \
139   $(top_builddir)/src/mesh/libgnunetmesh.la \
140   $(top_builddir)/src/util/libgnunetutil.la \
141   $(top_builddir)/src/testing/libgnunettesting.la
142 test_mesh_small_speed_ack_DEPENDENCIES = \
143   libgnunetmesh.la
144
145 if ENABLE_TEST_RUN
146 TESTS = test_mesh_api test_mesh_tree_api test_mesh_local_1 test_mesh_local_2 \
147  test_mesh_2dtorus test_mesh_small_unicast test_mesh_small_multicast
148 endif
149
150 EXTRA_DIST = \
151   test_mesh.conf \
152   test_mesh_2dtorus.conf \
153   test_mesh_small.conf \
154   test_mesh_path.conf