fix #5829
[oweals/gnunet.git] / src / conversation / Makefile.am
1 # This Makefile.am is in the public domain
2 SUBDIRS = .
3
4 plugindir = $(libdir)/gnunet
5
6 if MINGW
7   WINFLAGS = -no-undefined -Wl,--export-all-symbols
8 endif
9
10 AM_CPPFLAGS = \
11   $(GNUNET_CPPFLAGS) \
12   -I$(top_srcdir)/src/include \
13   -I$(top_srcdir)
14
15 if BUILD_CONVERSATION
16 lib_LTLIBRARIES = \
17  libgnunetmicrophone.la \
18  libgnunetspeaker.la \
19  libgnunetconversation.la
20
21 bin_PROGRAMS = \
22  gnunet-conversation-test \
23  gnunet-conversation
24
25 libexec_PROGRAMS = \
26   gnunet-service-conversation
27
28 check_PROGRAMS = \
29  test_conversation_api \
30  test_conversation_api_reject \
31  test_conversation_api_twocalls
32
33 pkgcfg_DATA = conversation.conf
34 endif
35
36 pkgcfgdir= $(pkgdatadir)/config.d/
37
38 libexecdir= $(pkglibdir)/libexec/
39
40 plugin_LTLIBRARIES = \
41   libgnunet_plugin_gnsrecord_conversation.la
42
43
44 libgnunet_plugin_gnsrecord_conversation_la_SOURCES = \
45   plugin_gnsrecord_conversation.c
46 libgnunet_plugin_gnsrecord_conversation_la_LIBADD = \
47   $(top_builddir)/src/util/libgnunetutil.la \
48   $(LTLIBINTL)
49 libgnunet_plugin_gnsrecord_conversation_la_LDFLAGS = \
50  $(GN_PLUGIN_LDFLAGS)
51
52
53 libgnunetmicrophone_la_SOURCES = \
54   microphone.c
55 libgnunetmicrophone_la_LIBADD = \
56  $(top_builddir)/src/util/libgnunetutil.la
57 libgnunetmicrophone_la_LDFLAGS = \
58   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
59   -version-info 0:0:0
60
61 libgnunetspeaker_la_SOURCES = \
62   speaker.c
63 libgnunetspeaker_la_LIBADD = \
64  $(top_builddir)/src/util/libgnunetutil.la
65 libgnunetspeaker_la_LDFLAGS = \
66   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
67   -version-info 0:0:0
68
69
70 libgnunetconversation_la_SOURCES = \
71   conversation_api.c \
72   conversation_api_call.c \
73   conversation.h
74 libgnunetconversation_la_LIBADD = \
75   $(top_builddir)/src/gns/libgnunetgns.la \
76   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
77   $(top_builddir)/src/namestore/libgnunetnamestore.la \
78   $(top_builddir)/src/identity/libgnunetidentity.la \
79   $(top_builddir)/src/util/libgnunetutil.la
80
81 libgnunetconversation_la_LDFLAGS = \
82   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
83   -version-info 0:0:0
84
85
86 if BUILD_PULSE_HELPERS
87 AUDIO_HELPER_RECD=gnunet-helper-audio-record
88 AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
89 AUDIO_TESTS=$(check_PROGRAMS)
90 else
91 if BUILD_GST_HELPERS
92 AUDIO_HELPER_RECD=gnunet-helper-audio-record
93 AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
94 AUDIO_TESTS=$(check_PROGRAMS)
95 else
96 if BUILD_EXPERIMENTAL_HELPERS
97 AUDIO_HELPER_RECD=gnunet-helper-audio-record
98 AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
99 AUDIO_TESTS=$(check_PROGRAMS)
100 endif
101 endif
102 endif
103
104 libexec_PROGRAMS += \
105   $(AUDIO_HELPER_RECD) \
106   $(AUDIO_HELPER_PLAY)
107
108 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
109 if ENABLE_TEST_RUN
110 TESTS = $(AUDIO_TESTS)
111 endif
112
113 if BUILD_PULSE_HELPERS
114 gnunet_helper_audio_record_SOURCES = \
115   gnunet-helper-audio-record.c
116 gnunet_helper_audio_record_LDADD = \
117   $(top_builddir)/src/util/libgnunetutil.la \
118   -lpulse  -lopus -logg \
119   $(INTLLIBS)
120 gnunet_helper_audio_record_LDFLAGS = \
121   $(WINFLAGS)
122
123 gnunet_helper_audio_playback_SOURCES = \
124   gnunet-helper-audio-playback.c
125 gnunet_helper_audio_playback_LDADD = \
126   $(top_builddir)/src/util/libgnunetutil.la \
127   -lpulse -lopus -logg \
128   $(INTLLIBS)
129 gnunet_helper_audio_playback_LDFLAGS = \
130   $(WINFLAGS)
131 else
132 if BUILD_GST_HELPERS
133 gnunet_helper_audio_record_SOURCES = \
134   gnunet-helper-audio-record-gst.c
135 gnunet_helper_audio_record_LDADD = \
136   $(top_builddir)/src/util/libgnunetutil.la \
137   $(GST_LIBS) \
138   $(INTLLIBS)
139 gnunet_helper_audio_record_LDFLAGS = \
140   $(WINFLAGS) $(GST_LDFLAGS)
141 gnunet_helper_audio_record_CFLAGS = \
142  $(GST_CFLAGS)
143
144 gnunet_helper_audio_playback_SOURCES = \
145     gnunet-helper-audio-playback-gst.c
146 gnunet_helper_audio_playback_LDADD = \
147   $(top_builddir)/src/util/libgnunetutil.la \
148   $(GST_LIBS) \
149   $(INTLLIBS)
150 gnunet_helper_audio_playback_LDFLAGS = \
151   $(WINFLAGS) $(GST_LDFLAGS)
152 gnunet_helper_audio_playback_CFLAGS = \
153  $(GST_CFLAGS) -DIS_SPEAKER
154 else
155 if BUILD_EXPERIMENTAL_HELPERS
156 gnunet_helper_audio_record_SOURCES = \
157   gnunet_gst_test.c gnunet_gst.c
158 gnunet_helper_audio_record_LDADD = \
159   $(top_builddir)/src/util/libgnunetutil.la \
160   $(GST_LIBS) \
161   $(INTLLIBS)
162 gnunet_helper_audio_record_LDFLAGS = \
163   $(WINFLAGS) $(GST_LDFLAGS)
164 gnunet_helper_audio_record_CFLAGS = \
165  $(GST_CFLAGS) -DIS_MIC
166
167 gnunet_helper_audio_playback_SOURCES = \
168     gnunet_gst_test.c gnunet_gst.c
169 gnunet_helper_audio_playback_LDADD = \
170   $(top_builddir)/src/util/libgnunetutil.la \
171   $(GST_LIBS) \
172   $(INTLLIBS)
173 gnunet_helper_audio_playback_LDFLAGS = \
174   $(WINFLAGS) $(GST_LDFLAGS)
175 gnunet_helper_audio_playback_CFLAGS = \
176  $(GST_CFLAGS) -DIS_SPEAKER
177 endif
178 endif
179 endif
180
181 gnunet_service_conversation_SOURCES = \
182   gnunet-service-conversation.c
183 gnunet_service_conversation_LDADD = \
184   libgnunetconversation.la \
185   libgnunetspeaker.la \
186   libgnunetmicrophone.la \
187   $(top_builddir)/src/cadet/libgnunetcadet.la \
188   $(top_builddir)/src/util/libgnunetutil.la \
189   $(INTLLIBS)
190 gnunet_service_conversation_LDFLAGS = \
191   $(WINFLAGS)
192
193 gnunet_conversation_SOURCES = \
194   gnunet-conversation.c
195 gnunet_conversation_LDADD = \
196   libgnunetmicrophone.la \
197   libgnunetspeaker.la \
198   libgnunetconversation.la \
199   $(top_builddir)/src/gns/libgnunetgns.la \
200   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
201   $(top_builddir)/src/namestore/libgnunetnamestore.la \
202   $(top_builddir)/src/identity/libgnunetidentity.la \
203   $(top_builddir)/src/util/libgnunetutil.la \
204   $(INTLLIBS)
205 gnunet_conversation_LDFLAGS = \
206  $(WINFLAGS)
207
208 gnunet_conversation_test_SOURCES = \
209   gnunet-conversation-test.c
210 gnunet_conversation_test_LDADD = \
211   libgnunetmicrophone.la \
212   libgnunetspeaker.la \
213   $(top_builddir)/src/util/libgnunetutil.la  \
214   $(INTLLIBS)
215 gnunet_conversation_test_LDFLAGS = \
216  $(WINFLAGS)
217
218
219 test_conversation_api_SOURCES = \
220  test_conversation_api.c
221 test_conversation_api_LDADD = \
222   libgnunetconversation.la \
223   libgnunetspeaker.la \
224   libgnunetmicrophone.la \
225   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
226   $(top_builddir)/src/namestore/libgnunetnamestore.la \
227   $(top_builddir)/src/identity/libgnunetidentity.la \
228   $(top_builddir)/src/testing/libgnunettesting.la \
229   $(top_builddir)/src/util/libgnunetutil.la
230 test_conversation_api_LDFLAGS = \
231  $(WINFLAGS) -export-dynamic
232
233 test_conversation_api_twocalls_SOURCES = \
234  test_conversation_api_twocalls.c
235 test_conversation_api_twocalls_LDADD = \
236   libgnunetconversation.la \
237   libgnunetspeaker.la \
238   libgnunetmicrophone.la \
239   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
240   $(top_builddir)/src/namestore/libgnunetnamestore.la \
241   $(top_builddir)/src/identity/libgnunetidentity.la \
242   $(top_builddir)/src/testing/libgnunettesting.la \
243   $(top_builddir)/src/util/libgnunetutil.la
244 test_conversation_api_twocalls_LDFLAGS = \
245  $(WINFLAGS) -export-dynamic
246
247 test_conversation_api_reject_SOURCES = \
248  test_conversation_api_reject.c
249 test_conversation_api_reject_LDADD = \
250   libgnunetconversation.la \
251   libgnunetspeaker.la \
252   libgnunetmicrophone.la \
253   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
254   $(top_builddir)/src/namestore/libgnunetnamestore.la \
255   $(top_builddir)/src/identity/libgnunetidentity.la \
256   $(top_builddir)/src/testing/libgnunettesting.la \
257   $(top_builddir)/src/util/libgnunetutil.la
258 test_conversation_api_reject_LDFLAGS = \
259  $(WINFLAGS) -export-dynamic
260
261
262
263 EXTRA_DIST = test_conversation.conf