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