From 795aa33028f9839c6e267d0fd9182f500d7d6c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Zwierko?= Date: Sun, 28 Oct 2007 13:21:56 +0000 Subject: [PATCH] git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6073 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_opal/Makefile.am | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/mod/endpoints/mod_opal/Makefile.am diff --git a/src/mod/endpoints/mod_opal/Makefile.am b/src/mod/endpoints/mod_opal/Makefile.am new file mode 100644 index 0000000000..754ff4a257 --- /dev/null +++ b/src/mod/endpoints/mod_opal/Makefile.am @@ -0,0 +1,38 @@ +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=$(prefix)/mod + +MODNAME=mod_opal + +OPAL_DIR=$(switch_builddir)/libs/opal + +include $(OPAL_DIR)/opal_inc.mak + +mod_LTLIBRARIES = mod_opal.la +mod_opal_la_SOURCES = mod_opalh323.cpp opalh323_backend.cpp +mod_opal_la_CFLAGS = $(AM_CFLAGS) +mod_opal_la_CFLAGS += -I. -I$(OPAL_DIR)/include +mod_opal_la_CPPFLAGS = $(AM_CPPFLAGS) +mod_opal_la_CPPFLAGS += -I. -I$(OPAL_DIR)/include +mod_opal_la_LIBADD = $(switch_builddir)/libfreeswitch.la +mod_opal_la_LDFLAGS = -avoid-version -module -no-undefined + +#Override the linstall target so we just install the .so/.dylib + +install-data-am: $(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN) + +$(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).la + @echo installing $(MODNAME).$(DYNAMIC_LIB_EXTEN) + @if [ -f .libs/$(MODNAME).$(DYNAMIC_LIB_EXTEN) ] ; then \ + $(LIBTOOL) --mode=install $(INSTALL) .libs/$(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/$(moddir) >/dev/null ; \ + else \ + $(LIBTOOL) --mode=install $(INSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/$(moddir) >/dev/null ; \ + fi