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