log: add \n
[oweals/gnunet.git] / src / conversation / Makefile.am
index da5702653adf09871cfd35390ac0cd4f19fb631c..f61173a66f63dc07075179da24d8c0650c07dc66 100644 (file)
@@ -1,7 +1,12 @@
+# This Makefile.am is in the public domain
 SUBDIRS = .
 
 plugindir = $(libdir)/gnunet
 
+if MINGW
+  WINFLAGS = -no-undefined -Wl,--export-all-symbols
+endif
+
 AM_CPPFLAGS = \
   $(GNUNET_CPPFLAGS) \
   -I$(top_srcdir)/src/include \
@@ -12,9 +17,9 @@ lib_LTLIBRARIES = \
  libgnunetspeaker.la \
  libgnunetconversation.la
 
-pkgcfgdir= $(prefix)/share/gnunet/config.d/
+pkgcfgdir= $(pkgdatadir)/config.d/
 
-libexecdir= $(prefix)/lib/gnunet/libexec/
+libexecdir= $(pkglibdir)/libexec/
 
 plugin_LTLIBRARIES = \
   libgnunet_plugin_gnsrecord_conversation.la
@@ -34,7 +39,7 @@ libgnunetmicrophone_la_SOURCES = \
 libgnunetmicrophone_la_LIBADD = \
  $(top_builddir)/src/util/libgnunetutil.la
 libgnunetmicrophone_la_LDFLAGS = \
-  $(GNUNET_LDFLAGS)  $(WINFLAGS) \
+  $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
   -version-info 0:0:0
 
 libgnunetspeaker_la_SOURCES = \
@@ -42,13 +47,14 @@ libgnunetspeaker_la_SOURCES = \
 libgnunetspeaker_la_LIBADD = \
  $(top_builddir)/src/util/libgnunetutil.la
 libgnunetspeaker_la_LDFLAGS = \
-  $(GNUNET_LDFLAGS)  $(WINFLAGS) \
+  $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
   -version-info 0:0:0
 
 
 libgnunetconversation_la_SOURCES = \
   conversation_api.c \
-  conversation_api_call.c
+  conversation_api_call.c \
+  conversation.h
 libgnunetconversation_la_LIBADD = \
   $(top_builddir)/src/gns/libgnunetgns.la \
   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
@@ -57,7 +63,7 @@ libgnunetconversation_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la
 
 libgnunetconversation_la_LDFLAGS = \
-  $(GNUNET_LDFLAGS)  $(WINFLAGS) \
+  $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
   -version-info 0:0:0
 
 
@@ -68,43 +74,105 @@ bin_PROGRAMS = \
 libexec_PROGRAMS = \
   gnunet-service-conversation
 
-if HAVE_PULSE
-if HAVE_OPUS
-libexec_PROGRAMS += \
-  gnunet-helper-audio-record \
-  gnunet-helper-audio-playback
-endif
-endif
-
-
 check_PROGRAMS = \
  test_conversation_api \
  test_conversation_api_reject \
  test_conversation_api_twocalls
 
-if HAVE_PULSE
-if HAVE_OPUS
-TESTS = $(check_PROGRAMS)
+if BUILD_PULSE_HELPERS
+AUDIO_HELPER_RECD=gnunet-helper-audio-record
+AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
+AUDIO_TESTS=$(check_PROGRAMS)
+else
+if BUILD_GST_HELPERS
+AUDIO_HELPER_RECD=gnunet-helper-audio-record
+AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
+AUDIO_TESTS=$(check_PROGRAMS)
+else
+if BUILD_EXPERIMENTAL_HELPERS
+AUDIO_HELPER_RECD=gnunet-helper-audio-record
+AUDIO_HELPER_PLAY=gnunet-helper-audio-playback
+AUDIO_TESTS=$(check_PROGRAMS)
+endif
 endif
 endif
 
+libexec_PROGRAMS += \
+  $(AUDIO_HELPER_RECD) \
+  $(AUDIO_HELPER_PLAY)
+
+AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
+if ENABLE_TEST_RUN
+TESTS = $(AUDIO_TESTS)
+endif
+
+if BUILD_PULSE_HELPERS
 gnunet_helper_audio_record_SOURCES = \
   gnunet-helper-audio-record.c
 gnunet_helper_audio_record_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
-  -lpulse  -lopus\
+  -lpulse  -lopus -logg \
   $(INTLLIBS)
 gnunet_helper_audio_record_LDFLAGS = \
-  $(GNUNET_LDFLAGS)  $(WINFLAGS)
+  $(WINFLAGS)
 
 gnunet_helper_audio_playback_SOURCES = \
   gnunet-helper-audio-playback.c
 gnunet_helper_audio_playback_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
-  -lpulse -lopus\
+  -lpulse -lopus -logg \
   $(INTLLIBS)
 gnunet_helper_audio_playback_LDFLAGS = \
-  $(GNUNET_LDFLAGS)  $(WINFLAGS)
+  $(WINFLAGS)
+else
+if BUILD_GST_HELPERS
+gnunet_helper_audio_record_SOURCES = \
+  gnunet-helper-audio-record-gst.c
+gnunet_helper_audio_record_LDADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GST_LIBS) \
+  $(INTLLIBS)
+gnunet_helper_audio_record_LDFLAGS = \
+  $(WINFLAGS) $(GST_LDFLAGS)
+gnunet_helper_audio_record_CFLAGS = \
+ $(GST_CFLAGS)
+
+gnunet_helper_audio_playback_SOURCES = \
+    gnunet_gst_test.c gnunet_gst.c
+gnunet_helper_audio_playback_LDADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GST_LIBS) \
+  $(INTLLIBS)
+gnunet_helper_audio_playback_LDFLAGS = \
+  $(WINFLAGS) $(GST_LDFLAGS)
+gnunet_helper_audio_playback_CFLAGS = \
+ $(GST_CFLAGS) -DIS_SPEAKER
+else
+if BUILD_EXPERIMENTAL_HELPERS
+gnunet_helper_audio_record_SOURCES = \
+  gnunet_gst_test.c gnunet_gst.c
+gnunet_helper_audio_record_LDADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GST_LIBS) \
+  $(INTLLIBS)
+gnunet_helper_audio_record_LDFLAGS = \
+  $(WINFLAGS) $(GST_LDFLAGS)
+gnunet_helper_audio_record_CFLAGS = \
+ $(GST_CFLAGS) -DIS_MIC
+
+gnunet_helper_audio_playback_SOURCES = \
+    gnunet_gst_test.c gnunet_gst.c
+gnunet_helper_audio_playback_LDADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(GST_LIBS) \
+  $(INTLLIBS)
+gnunet_helper_audio_playback_LDFLAGS = \
+  $(WINFLAGS) $(GST_LDFLAGS)
+gnunet_helper_audio_playback_CFLAGS = \
+ $(GST_CFLAGS) -DIS_SPEAKER
+endif
+endif
+endif
 
 gnunet_service_conversation_SOURCES = \
   gnunet-service-conversation.c
@@ -112,11 +180,11 @@ gnunet_service_conversation_LDADD = \
   libgnunetconversation.la \
   libgnunetspeaker.la \
   libgnunetmicrophone.la \
-  $(top_builddir)/src/mesh/libgnunetmesh.la \
+  $(top_builddir)/src/cadet/libgnunetcadet.la \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(INTLLIBS)
 gnunet_service_conversation_LDFLAGS = \
-  $(GNUNET_LDFLAGS)  $(WINFLAGS)
+  $(WINFLAGS)
 
 gnunet_conversation_SOURCES = \
   gnunet-conversation.c
@@ -131,7 +199,7 @@ gnunet_conversation_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(INTLLIBS)
 gnunet_conversation_LDFLAGS = \
- $(GNUNET_LDFLAGS) $(WINFLAGS)
+ $(WINFLAGS)
 
 gnunet_conversation_test_SOURCES = \
   gnunet-conversation-test.c
@@ -141,7 +209,7 @@ gnunet_conversation_test_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la  \
   $(INTLLIBS)
 gnunet_conversation_test_LDFLAGS = \
- $(GNUNET_LDFLAGS) $(WINFLAGS)
+ $(WINFLAGS)
 
 
 test_conversation_api_SOURCES = \
@@ -156,7 +224,7 @@ test_conversation_api_LDADD = \
   $(top_builddir)/src/testing/libgnunettesting.la \
   $(top_builddir)/src/util/libgnunetutil.la
 test_conversation_api_LDFLAGS = \
- $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+ $(WINFLAGS) -export-dynamic
 
 test_conversation_api_twocalls_SOURCES = \
  test_conversation_api_twocalls.c
@@ -170,7 +238,7 @@ test_conversation_api_twocalls_LDADD = \
   $(top_builddir)/src/testing/libgnunettesting.la \
   $(top_builddir)/src/util/libgnunetutil.la
 test_conversation_api_twocalls_LDFLAGS = \
- $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+ $(WINFLAGS) -export-dynamic
 
 test_conversation_api_reject_SOURCES = \
  test_conversation_api_reject.c
@@ -184,7 +252,7 @@ test_conversation_api_reject_LDADD = \
   $(top_builddir)/src/testing/libgnunettesting.la \
   $(top_builddir)/src/util/libgnunetutil.la
 test_conversation_api_reject_LDFLAGS = \
- $(GNUNET_LDFLAGS)  $(WINFLAGS) -export-dynamic
+ $(WINFLAGS) -export-dynamic
 
 
  pkgcfg_DATA = conversation.conf