diff --git a/build/modmake.rulesam b/build/modmake.rulesam new file mode 100644 index 0000000000..31bde62440 --- /dev/null +++ b/build/modmake.rulesam @@ -0,0 +1,11 @@ +AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS) +AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) +AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) +#we should set all these vars from configure, no reason to have these in each Makefile.am +LIBTOOL = echo "`link=\`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll\`;if test -n "$$link"; then echo Creating $@;fi`";`if test -z "$(VERBOSE)" ; \ +then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(SHELL) $(switch_builddir)/libtool; fi` +AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s` +# Dirty trick to override the link output +LIBS+=> $(MODNAME).log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat $(MODNAME).log;fi;if test "$$error" = "yes";then exit 1;fi + +moddir=@modinstdir@ diff --git a/src/mod/asr_tts/mod_unimrcp/Makefile.am b/src/mod/asr_tts/mod_unimrcp/Makefile.am index cd5ead0324..25be5a6baa 100644 --- a/src/mod/asr_tts/mod_unimrcp/Makefile.am +++ b/src/mod/asr_tts/mod_unimrcp/Makefile.am @@ -1,17 +1,7 @@ +include $(top_srcdir)/build/modmake.rulesam + MODNAME=mod_unimrcp -AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS) -AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -#AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) -#we should set all these vars from configure, no reason to have these in each Makefile.am -LIBTOOL = echo "`link=\`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll\`;if test -n "$$link"; then echo Creating $@;fi`";`if test -z "$(VERBOSE)" ; \ -then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(SHELL) $(switch_builddir)/libtool; fi` -AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s` -# Dirty trick to override the link output -LIBS+=> $(MODNAME).log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat $(MODNAME).log;fi;if test "$$error" = "yes";then exit 1;fi - -moddir=@modinstdir@ - UNIMRCP_DIR=$(switch_builddir)/libs/unimrcp UNIMRCPLA=$(UNIMRCP_DIR)/platforms/libunimrcp-client/libunimrcpclient.la diff --git a/src/mod/endpoints/mod_sofia/Makefile.am b/src/mod/endpoints/mod_sofia/Makefile.am index 2e52e0d64d..73e3963f78 100644 --- a/src/mod/endpoints/mod_sofia/Makefile.am +++ b/src/mod/endpoints/mod_sofia/Makefile.am @@ -1,14 +1,4 @@ -AM_CFLAGS = $(SWITCH_AM_CFLAGS) -AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -#AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) -#we should set all these vars from configure, no reason to have these in each Makefile.am -LIBTOOL = echo "`link=\`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll\`;if test -n "$$link"; then echo Creating $@;fi`";`if test -z "$(VERBOSE)" ; \ -then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(SHELL) $(switch_builddir)/libtool; fi` -AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s` -# Dirty trick to override the link output -LIBS+=> $(MODNAME).log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat $(MODNAME).log;fi;if test "$$error" = "yes";then exit 1;fi - -moddir=@modinstdir@ +include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_sofia @@ -18,7 +8,7 @@ SOFIALA=$(SOFIAUA_DIR)/libsofia-sip-ua.la mod_LTLIBRARIES = mod_sofia.la mod_sofia_la_SOURCES = mod_sofia.c sofia.c sofia_glue.c sofia_presence.c sofia_reg.c sofia_sla.c mod_sofia.h -mod_sofia_la_CFLAGS = $(AM_CFLAGS) $(SWITCH_ANSI_CFLAGS) +mod_sofia_la_CFLAGS = $(AM_CFLAGS) mod_sofia_la_CFLAGS += -I. -I$(SOFIAUA_DIR)/bnf -I$(SOFIAUA_DIR)/features mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/http -I$(SOFIAUA_DIR)/ipt mod_sofia_la_CFLAGS += -I$(SOFIAUA_DIR)/iptsec -I$(SOFIAUA_DIR)/msg @@ -44,7 +34,7 @@ BUILT_SOURCES = $(SOFIALA) $(mod_sofia_la_SOURCES) : $(BUILT_SOURCES) $(SOFIALA): $(SOFIA_DIR) $(SOFIA_DIR)/.update - cd $(SOFIA_DIR) && $(MAKE) SOFIA_CFLAGS="$(AM_CFLAGS)" + cd $(SOFIA_DIR) && $(MAKE) SOFIA_CFLAGS="$(SWITCH_AM_CFLAGS)" $(TOUCH_TARGET) ../../../../libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h: $(SOFIALA)