fix build; move rest plugins to separate folder
[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 libgnunetpeerinfo_la_SOURCES = \
25   peerinfo_api.c peerinfo.h \
26   peerinfo_api_notify.c
27 libgnunetpeerinfo_la_LIBADD = \
28   $(top_builddir)/src/hello/libgnunethello.la \
29   $(top_builddir)/src/util/libgnunetutil.la \
30   $(XLIB) \
31   $(LTLIBINTL)
32 libgnunetpeerinfo_la_LDFLAGS = \
33   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
34   -version-info 0:0:0
35
36
37 libexec_PROGRAMS = \
38  gnunet-service-peerinfo
39
40 gnunet_service_peerinfo_SOURCES = \
41  gnunet-service-peerinfo.c
42 gnunet_service_peerinfo_LDADD = \
43   $(top_builddir)/src/hello/libgnunethello.la \
44   $(top_builddir)/src/statistics/libgnunetstatistics.la \
45   $(top_builddir)/src/util/libgnunetutil.la
46   
47 if HAVE_BENCHMARKS
48  PEERINFO_BENCHMARKS = \
49  perf_peerinfo_api
50 endif
51
52 if HAVE_TESTING
53 check_PROGRAMS = \
54  test_peerinfo_shipped_hellos \
55  test_peerinfo_api \
56  test_peerinfo_api_friend_only \
57  test_peerinfo_api_notify_friend_only \
58  $(PEERINFO_BENCHMARKS)
59 endif
60
61
62 if ENABLE_TEST_RUN
63 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
64 TESTS = $(check_PROGRAMS)
65 endif
66
67 test_peerinfo_shipped_hellos_SOURCES = \
68  test_peerinfo_shipped_hellos.c
69 test_peerinfo_shipped_hellos_LDADD = \
70  $(top_builddir)/src/hello/libgnunethello.la \
71  libgnunetpeerinfo.la \
72  $(top_builddir)/src/testing/libgnunettesting.la \
73  $(top_builddir)/src/util/libgnunetutil.la
74
75 test_peerinfo_api_SOURCES = \
76  test_peerinfo_api.c
77 test_peerinfo_api_LDADD = \
78  $(top_builddir)/src/hello/libgnunethello.la \
79  libgnunetpeerinfo.la \
80  $(top_builddir)/src/testing/libgnunettesting.la \
81  $(top_builddir)/src/util/libgnunetutil.la
82
83 test_peerinfo_api_friend_only_SOURCES = \
84  test_peerinfo_api_friend_only.c
85 test_peerinfo_api_friend_only_LDADD = \
86  $(top_builddir)/src/hello/libgnunethello.la \
87  libgnunetpeerinfo.la \
88  $(top_builddir)/src/testing/libgnunettesting.la \
89  $(top_builddir)/src/util/libgnunetutil.la
90
91 test_peerinfo_api_notify_friend_only_SOURCES = \
92  test_peerinfo_api_notify_friend_only.c
93 test_peerinfo_api_notify_friend_only_LDADD = \
94  $(top_builddir)/src/hello/libgnunethello.la \
95  libgnunetpeerinfo.la \
96  $(top_builddir)/src/testing/libgnunettesting.la \
97  $(top_builddir)/src/util/libgnunetutil.la
98
99 perf_peerinfo_api_SOURCES = \
100  perf_peerinfo_api.c
101 perf_peerinfo_api_LDADD = \
102  $(top_builddir)/src/hello/libgnunethello.la \
103  libgnunetpeerinfo.la \
104  $(top_builddir)/src/testing/libgnunettesting.la \
105  $(top_builddir)/src/util/libgnunetutil.la
106
107 EXTRA_DIST = \
108   test_peerinfo_api_data.conf