diff --git a/configure.in b/configure.in index d5d4969aa7..ca5fd93ec6 100644 --- a/configure.in +++ b/configure.in @@ -792,7 +792,9 @@ AC_CONFIG_FILES([Makefile src/mod/applications/mod_stress/Makefile src/mod/applications/mod_t38gateway/Makefile src/mod/endpoints/mod_iax/Makefile + src/mod/endpoints/mod_portaudio/Makefile src/mod/endpoints/mod_sofia/Makefile + src/mod/formats/mod_portaudio_stream/Makefile src/mod/asr_tts/mod_unimrcp/Makefile src/mod/languages/mod_java/Makefile src/mod/languages/mod_python/Makefile diff --git a/src/mod/endpoints/mod_portaudio/Makefile b/src/mod/endpoints/mod_portaudio/Makefile deleted file mode 100644 index 95e57910eb..0000000000 --- a/src/mod/endpoints/mod_portaudio/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -BASE=../../../.. - -PA_DIR=$(BASE)/libs/portaudio - -PALA=$(PA_DIR)/lib/libportaudio.la -LOCAL_CFLAGS=-I. -I$(PA_DIR)/include -D__EXTENSION__=1 - -LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon" ; fi ; - -LOCAL_LIBADD=$(PALA) -LOCAL_OBJS=pablio.o pa_ringbuffer.o -LOCAL_SOURCES=pablio.c pa_ringbuffer.c - -include $(BASE)/build/modmake.rules - -$(PALA): $(PA_DIR) $(PA_DIR)/.update - cd $(PA_DIR) && $(MAKE) - $(TOUCH_TARGET) - -$(LOCAL_OBJS): $(LOCAL_SOURCES) diff --git a/src/mod/endpoints/mod_portaudio/Makefile.am b/src/mod/endpoints/mod_portaudio/Makefile.am new file mode 100644 index 0000000000..e0182163fe --- /dev/null +++ b/src/mod/endpoints/mod_portaudio/Makefile.am @@ -0,0 +1,25 @@ +include $(top_srcdir)/build/modmake.rulesam + +MODNAME=mod_portaudio +PA_DIR=$(switch_srcdir)/libs/portaudio +PALA=$(switch_builddir)/libs/portaudio/lib/libportaudio.la + +mod_LTLIBRARIES = mod_portaudio.la +mod_portaudio_la_SOURCES = mod_portaudio.c pablio.c pa_ringbuffer.c +mod_portaudio_la_CFLAGS = $(AM_CFLAGS) +mod_portaudio_la_CFLAGS += -I. -I$(PA_DIR)/include -D__EXTENSION__=1 +mod_portaudio_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(PALA) +mod_portaudio_la_LDFLAGS = -avoid-version -module -no-undefined + +if ISMAC +mod_portaudio_la_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon +endif + +BUILT_SOURCES = $(PALA) + +$(mod_portaudio_la_SOURCES) : $(BUILT_SOURCES) + +$(PALA): $(PA_DIR) $(PA_DIR)/.update + cd $(switch_builddir)/libs/portaudio && $(MAKE) PORTAUDIO_CFLAGS="$(SWITCH_AM_CFLAGS)" + $(TOUCH_TARGET) + diff --git a/src/mod/formats/mod_portaudio_stream/Makefile b/src/mod/formats/mod_portaudio_stream/Makefile deleted file mode 100644 index 25de143ed7..0000000000 --- a/src/mod/formats/mod_portaudio_stream/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -BASE=../../../.. -BASE=../../../.. - -PA_DIR=$(BASE)/libs/portaudio -MODPA_DIR=$(BASE)/src/mod/endpoints/mod_portaudio - - -PALA=$(PA_DIR)/lib/libportaudio.la -LOCAL_CFLAGS=-I. -I$(PA_DIR)/include -I$(MODPA_DIR) -D__EXTENSION__=1 - -LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon" ; fi ; - -LOCAL_LIBADD=$(PALA) -LOCAL_OBJS=$(MODPA_DIR)/pablio.o $(MODPA_DIR)/pa_ringbuffer.o -LOCAL_SOURCES=$(MODPA_DIR)/pablio.c $(MODPA_DIR)/pa_ringbuffer.c - -include $(BASE)/build/modmake.rules - -$(PALA): $(PA_DIR) $(PA_DIR)/.update - cd $(PA_DIR) && $(MAKE) - $(TOUCH_TARGET) - -$(LOCAL_OBJS): $(LOCAL_SOURCES) \ No newline at end of file diff --git a/src/mod/formats/mod_portaudio_stream/Makefile.am b/src/mod/formats/mod_portaudio_stream/Makefile.am new file mode 100644 index 0000000000..bfd9662a3e --- /dev/null +++ b/src/mod/formats/mod_portaudio_stream/Makefile.am @@ -0,0 +1,26 @@ +include $(top_srcdir)/build/modmake.rulesam + +MODNAME=mod_portaudio_stream +PA_DIR=$(switch_srcdir)/libs/portaudio +PALA=$(switch_builddir)/libs/portaudio/lib/libportaudio.la +MODPA_DIR=$(switch_srcdir)/src/mod/endpoints/mod_portaudio + +mod_LTLIBRARIES = mod_portaudio_stream.la +mod_portaudio_stream_la_SOURCES = mod_portaudio_stream.c $(MODPA_DIR)/pablio.c $(MODPA_DIR)/pa_ringbuffer.c +mod_portaudio_stream_la_CFLAGS = $(AM_CFLAGS) +mod_portaudio_stream_la_CFLAGS += -I. -I$(PA_DIR)/include -D__EXTENSION__=1 -I$(MODPA_DIR) +mod_portaudio_stream_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(PALA) +mod_portaudio_stream_la_LDFLAGS = -avoid-version -module -no-undefined + +if ISMAC +mod_portaudio_stream_la_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon +endif + +BUILT_SOURCES = $(PALA) + +$(mod_portaudio_stream_la_SOURCES) : $(BUILT_SOURCES) + +$(PALA): $(PA_DIR) $(PA_DIR)/.update + cd $(switch_builddir)/libs/portaudio && $(MAKE) PORTAUDIO_CFLAGS="$(SWITCH_AM_CFLAGS)" + $(TOUCH_TARGET) +