1c8476076e05e2c6143b130920efa344882411f5
[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 libexecdir= $(pkglibdir)/libexec/
15
16 pkgcfg_DATA = \
17   mesh.conf
18
19 plugindir = $(libdir)/gnunet
20
21 AM_CLFAGS = -g
22
23 libexec_PROGRAMS = \
24  gnunet-service-mesh $(EXP_LIBEXEC)
25
26 bin_PROGRAMS = \
27  gnunet-mesh
28
29 lib_LTLIBRARIES = \
30   libgnunetmesh.la $(EXP_LIB)
31
32 plugin_LTLIBRARIES = \
33  libgnunet_plugin_block_mesh.la
34
35 libgnunet_plugin_block_mesh_la_SOURCES = \
36  plugin_block_mesh.c
37 libgnunet_plugin_block_mesh_la_LIBADD = \
38  $(top_builddir)/src/block/libgnunetblock.la \
39  $(top_builddir)/src/util/libgnunetutil.la
40 libgnunet_plugin_block_mesh_la_LDFLAGS = \
41  $(GN_PLUGIN_LDFLAGS)
42 libgnunet_plugin_block_mesh_la_DEPENDENCIES = \
43  $(top_builddir)/src/block/libgnunetblock.la \
44  $(top_builddir)/src/util/libgnunetutil.la
45
46
47 libgnunetmesh_la_SOURCES = \
48   mesh_api.c mesh_common.c
49 libgnunetmesh_la_LIBADD = \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(XLIB) \
52   $(LTLIBINTL)
53 libgnunetmesh_la_LDFLAGS = \
54   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
55   -version-info 3:0:0
56
57 gnunet_mesh_SOURCES = \
58   gnunet-mesh.c
59 gnunet_mesh_LDADD = \
60   $(top_builddir)/src/mesh/libgnunetmesh.la \
61   $(top_builddir)/src/util/libgnunetutil.la
62 gnunet_mesh_DEPENDENCIES = \
63   libgnunetmesh.la
64
65 gnunet_service_mesh_SOURCES = \
66  gnunet-service-mesh.c \
67  mesh_path.c \
68  mesh_common.c
69 gnunet_service_mesh_CFLAGS = $(AM_CFLAGS)
70 gnunet_service_mesh_LDADD = \
71   $(top_builddir)/src/util/libgnunetutil.la \
72   $(top_builddir)/src/core/libgnunetcore.la \
73   $(top_builddir)/src/dht/libgnunetdht.la \
74   $(top_builddir)/src/statistics/libgnunetstatistics.la \
75   $(top_builddir)/src/block/libgnunetblock.la
76 gnunet_service_mesh_DEPENDENCIES = \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(top_builddir)/src/core/libgnunetcore.la \
79   $(top_builddir)/src/dht/libgnunetdht.la \
80   $(top_builddir)/src/statistics/libgnunetstatistics.la \
81   $(top_builddir)/src/block/libgnunetblock.la
82 if LINUX
83   gnunet_service_mesh_LDFLAGS = -lrt
84 endif
85
86 if HAVE_TESTING
87 noinst_LIBRARIES = libgnunetmeshtest.a $(noinst_LIB_EXP)
88 endif
89
90 libgnunetmeshtest_a_SOURCES = \
91   mesh_test_lib.c mesh_test_lib.h
92 libgnunetmeshtest_a_LIBADD = \
93  $(top_builddir)/src/util/libgnunetutil.la \
94  $(top_builddir)/src/testbed/libgnunettestbed.la \
95  $(top_builddir)/src/mesh/libgnunetmesh.la
96 libgnunetmeshtest_a_DEPENDENCIES = \
97   libgnunetmesh.la
98
99 if HAVE_TESTING
100 check_PROGRAMS = \
101   test_mesh_local \
102   test_mesh_small_forward \
103   test_mesh_small_signal  \
104   test_mesh_small_speed  \
105   test_mesh_small_speed_ack  \
106   test_mesh_small_speed_nobuf  \
107   test_mesh_small_speed_backwards  \
108   test_mesh_small_speed_nobuf_backwards
109 endif
110
111 ld_mesh_test_lib = \
112   $(top_builddir)/src/util/libgnunetutil.la \
113   $(top_builddir)/src/testing/libgnunettesting.la \
114   $(top_builddir)/src/mesh/libgnunetmeshtest.a \
115   $(top_builddir)/src/mesh/libgnunetmesh.la \
116   $(top_builddir)/src/testbed/libgnunettestbed.la
117
118 dep_mesh_test_lib = \
119   libgnunetmesh.la \
120   libgnunetmeshtest.a
121
122 test_mesh_local_SOURCES = \
123   test_mesh_local.c
124 test_mesh_local_LDADD = $(ld_mesh_test_lib)
125 test_mesh_local_DEPENDENCIES = $(dep_mesh_test_lib)
126
127 test_mesh_small_forward_SOURCES = \
128   test_mesh_small.c
129 test_mesh_small_forward_LDADD = $(ld_mesh_test_lib)
130 test_mesh_small_forward_DEPENDENCIES = $(dep_mesh_test_lib)
131
132 test_mesh_small_signal_SOURCES = \
133   test_mesh_small.c
134 test_mesh_small_signal_LDADD = $(ld_mesh_test_lib)
135 test_mesh_small_signal_DEPENDENCIES = $(dep_mesh_test_lib)
136
137 test_mesh_small_speed_SOURCES = \
138   test_mesh_small.c
139 test_mesh_small_speed_LDADD = $(ld_mesh_test_lib)
140 test_mesh_small_speed_DEPENDENCIES = $(dep_mesh_test_lib)
141
142 test_mesh_small_speed_ack_SOURCES = \
143   test_mesh_small.c
144 test_mesh_small_speed_ack_LDADD = $(ld_mesh_test_lib)
145 test_mesh_small_speed_ack_DEPENDENCIES = $(dep_mesh_test_lib)
146
147 test_mesh_small_speed_nobuf_SOURCES = \
148   test_mesh_small.c
149 test_mesh_small_speed_nobuf_LDADD = $(ld_mesh_test_lib)
150 test_mesh_small_speed_nobuf_DEPENDENCIES = $(dep_mesh_test_lib)
151
152 test_mesh_small_speed_backwards_SOURCES = \
153   test_mesh_small.c
154 test_mesh_small_speed_backwards_LDADD = $(ld_mesh_test_lib)
155 test_mesh_small_speed_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
156
157 test_mesh_small_speed_nobuf_backwards_SOURCES = \
158   test_mesh_small.c
159 test_mesh_small_speed_nobuf_backwards_LDADD = $(ld_mesh_test_lib)
160 test_mesh_small_speed_nobuf_backwards_DEPENDENCIES = $(dep_mesh_test_lib)
161
162
163 if ENABLE_TEST_RUN
164 TESTS = \
165  $(check_PROGRAMS)
166 endif
167
168 EXTRA_DIST = \
169   mesh.h mesh_protocol.h \
170   test_mesh.conf