26f4de7a56c9657f0a1d3bb1c50b3ccc345c4924
[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 AM_CLFAGS = -g
13
14 bin_PROGRAMS = \
15  gnunet-service-mesh
16
17 lib_LTLIBRARIES = \
18   libgnunetmesh.la \
19   libgnunetmeshnew.la
20
21 libgnunetmesh_la_SOURCES = \
22   mesh_api.c mesh_protocol.h
23 libgnunetmesh_la_LIBADD = \
24   $(top_builddir)/src/util/libgnunetutil.la \
25   $(top_builddir)/src/core/libgnunetcore.la \
26   $(GN_LIBINTL) $(XLIB)
27 libgnunetmesh_la_LDFLAGS = \
28   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
29   -version-info 0:0:0
30
31 gnunet_service_mesh_SOURCES = \
32  gnunet-service-mesh.c mesh_tunnel_tree.c
33 gnunet_service_mesh_LDADD = \
34   $(top_builddir)/src/core/libgnunetcore.la\
35   $(top_builddir)/src/dht/libgnunetdht.la \
36   $(top_builddir)/src/util/libgnunetutil.la
37  gnunet_service_mesh_DEPENDENCIES = \
38   $(top_builddir)/src/core/libgnunetcore.la\
39   $(top_builddir)/src/dht/libgnunetdht.la \
40   $(top_builddir)/src/util/libgnunetutil.la
41
42 libgnunetmeshnew_la_SOURCES = \
43   mesh_api_new.c mesh.h
44 libgnunetmeshnew_la_LIBADD = \
45   $(top_builddir)/src/util/libgnunetutil.la \
46   $(XLIB)
47 libgnunetmeshnew_la_LDFLAGS = \
48   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
49   -version-info 0:0:0
50
51 check_PROGRAMS = \
52  test_mesh_api \
53  test_mesh_path_api \
54  test_mesh_local_1 \
55  test_mesh_local_2 \
56  test_mesh_small
57
58 test_mesh_api_SOURCES = \
59  test_mesh_api.c
60 test_mesh_api_LDADD = \
61  $(top_builddir)/src/util/libgnunetutil.la \
62  $(top_builddir)/src/mesh/libgnunetmeshnew.la
63 test_mesh_api_DEPENDENCIES = \
64   libgnunetmeshnew.la \
65    $(top_builddir)/src/util/libgnunetutil.la
66
67 test_mesh_path_api_SOURCES = \
68  test_mesh_path_api.c
69 test_mesh_path_api_LDADD = \
70  $(top_builddir)/src/util/libgnunetutil.la \
71   $(top_builddir)/src/dht/libgnunetdht.la
72 test_mesh_path_api_DEPENDENCIES = \
73   libgnunetmeshnew.la \
74   $(top_builddir)/src/dht/libgnunetdht.la
75
76 test_mesh_local_1_SOURCES = \
77  test_mesh_local_1.c
78 test_mesh_local_1_LDADD = \
79  $(top_builddir)/src/util/libgnunetutil.la \
80  $(top_builddir)/src/mesh/libgnunetmeshnew.la
81 test_mesh_local_1_DEPENDENCIES = \
82   libgnunetmeshnew.la
83
84 test_mesh_local_2_SOURCES = \
85  test_mesh_local_2.c
86 test_mesh_local_2_LDADD = \
87  $(top_builddir)/src/util/libgnunetutil.la \
88  $(top_builddir)/src/mesh/libgnunetmeshnew.la
89 test_mesh_local_2_DEPENDENCIES = \
90   libgnunetmeshnew.la
91
92 test_mesh_small_SOURCES = \
93  test_mesh_small.c
94 test_mesh_small_LDADD = \
95   $(top_builddir)/src/mesh/libgnunetmeshnew.la \
96   $(top_builddir)/src/util/libgnunetutil.la \
97   $(top_builddir)/src/testing/libgnunettesting.la
98 test_mesh_small_DEPENDENCIES = \
99   libgnunetmeshnew.la
100
101 if ENABLE_TEST_RUN
102 if HAVE_EXPERIMENTAL
103 TESTS = test_mesh_api test_mesh_path_api test_mesh_local_1 test_mesh_local_2
104 endif
105 endif
106
107 EXTRA_DIST = \
108   test_mesh.conf \
109   test_mesh_path.conf