Merge remote-tracking branch 'origin/master' into identity_oidc
[oweals/gnunet.git] / src / peerinfo / 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   peerinfo.conf
10
11 if MINGW
12  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
13 endif
14
15 if USE_COVERAGE
16   AM_CFLAGS = --coverage -O0
17   XLIB = -lgcov
18 endif
19
20 lib_LTLIBRARIES = libgnunetpeerinfo.la
21
22 libgnunetpeerinfo_la_SOURCES = \
23   peerinfo_api.c peerinfo.h \
24   peerinfo_api_notify.c
25 libgnunetpeerinfo_la_LIBADD = \
26   $(top_builddir)/src/hello/libgnunethello.la \
27   $(top_builddir)/src/util/libgnunetutil.la \
28   $(XLIB) \
29   $(LTLIBINTL)
30 libgnunetpeerinfo_la_LDFLAGS = \
31   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
32   -version-info 0:0:0
33
34
35 libexec_PROGRAMS = \
36  gnunet-service-peerinfo
37
38 gnunet_service_peerinfo_SOURCES = \
39  gnunet-service-peerinfo.c
40 gnunet_service_peerinfo_LDADD = \
41   $(top_builddir)/src/hello/libgnunethello.la \
42   $(top_builddir)/src/statistics/libgnunetstatistics.la \
43   $(top_builddir)/src/util/libgnunetutil.la
44
45 if HAVE_BENCHMARKS
46  PEERINFO_BENCHMARKS = \
47  perf_peerinfo_api
48 endif
49
50 if HAVE_TESTING
51 check_PROGRAMS = \
52  test_peerinfo_shipped_hellos \
53  test_peerinfo_api \
54  test_peerinfo_api_friend_only \
55  test_peerinfo_api_notify_friend_only \
56  $(PEERINFO_BENCHMARKS)
57 endif
58
59
60 if ENABLE_TEST_RUN
61 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
62 TESTS = $(check_PROGRAMS)
63 endif
64
65 test_peerinfo_shipped_hellos_SOURCES = \
66  test_peerinfo_shipped_hellos.c
67 test_peerinfo_shipped_hellos_LDADD = \
68  $(top_builddir)/src/hello/libgnunethello.la \
69  libgnunetpeerinfo.la \
70  $(top_builddir)/src/testing/libgnunettesting.la \
71  $(top_builddir)/src/util/libgnunetutil.la
72
73 test_peerinfo_api_SOURCES = \
74  test_peerinfo_api.c
75 test_peerinfo_api_LDADD = \
76  $(top_builddir)/src/hello/libgnunethello.la \
77  libgnunetpeerinfo.la \
78  $(top_builddir)/src/testing/libgnunettesting.la \
79  $(top_builddir)/src/util/libgnunetutil.la
80
81 test_peerinfo_api_friend_only_SOURCES = \
82  test_peerinfo_api_friend_only.c
83 test_peerinfo_api_friend_only_LDADD = \
84  $(top_builddir)/src/hello/libgnunethello.la \
85  libgnunetpeerinfo.la \
86  $(top_builddir)/src/testing/libgnunettesting.la \
87  $(top_builddir)/src/util/libgnunetutil.la
88
89 test_peerinfo_api_notify_friend_only_SOURCES = \
90  test_peerinfo_api_notify_friend_only.c
91 test_peerinfo_api_notify_friend_only_LDADD = \
92  $(top_builddir)/src/hello/libgnunethello.la \
93  libgnunetpeerinfo.la \
94  $(top_builddir)/src/testing/libgnunettesting.la \
95  $(top_builddir)/src/util/libgnunetutil.la
96
97 perf_peerinfo_api_SOURCES = \
98  perf_peerinfo_api.c
99 perf_peerinfo_api_LDADD = \
100  $(top_builddir)/src/hello/libgnunethello.la \
101  libgnunetpeerinfo.la \
102  $(top_builddir)/src/testing/libgnunettesting.la \
103  $(top_builddir)/src/util/libgnunetutil.la
104
105 EXTRA_DIST = \
106   test_peerinfo_api_data.conf