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