use better tricks in mod_cdr Makefile.am so we don't get warnings about duplicate targets, and so we can move all our tricks into configure soon
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4786 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8a4406ece2
commit
490f53c183
|
@ -1,7 +1,16 @@
|
|||
#we should set all these vars from configure, no reason to have these in each Makefile.am
|
||||
LIBTOOL=`if test -z "$(VERBOSE)" ; then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(switch_builddir)/libtool; fi;`
|
||||
#LIBTOOL = compile=`echo $<|grep .c`;link=`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll`; if test -n "$$compile"; then echo Compiling $<;fi; if test -n "$$link"; then echo Creating $@;fi; `if test -z "$(VERBOSE)" ; then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(switch_builddir)/libtool; fi;`
|
||||
#LIBTOOL=`if test -z "$(VERBOSE)" ; then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(switch_builddir)/libtool; fi;`
|
||||
LIBTOOL = 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 $(switch_builddir)/libtool; fi;`
|
||||
|
||||
AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s`
|
||||
LINK_OUTPUT_REDIR=> $(MODNAME).log || error="yes" ; \
|
||||
|
||||
# Dirty trick to override the link output
|
||||
LIBS+=> $(MODNAME).log || error="yes" ; \
|
||||
if test -n "$(VERBOSE)" -o "$$error" = "yes"; then \
|
||||
cat $(MODNAME).log ; \
|
||||
fi ;\
|
||||
|
@ -11,8 +20,6 @@ LINK_OUTPUT_REDIR=> $(MODNAME).log || error="yes" ; \
|
|||
|
||||
moddir=$(prefix)/mod
|
||||
|
||||
|
||||
|
||||
MODNAME=mod_cdr
|
||||
mod_LTLIBRARIES = mod_cdr.la
|
||||
mod_cdr_la_SOURCES = mod_cdr.cpp cdrcontainer.cpp basecdr.cpp baseregistry.cpp pddcdr.cpp csvcdr.cpp xmlcdr.cpp sqlitecdr.cpp
|
||||
|
@ -30,12 +37,6 @@ endif
|
|||
#mod_cdr_la_CFLAGS += -DSWITCH_QUEUE_ENHANCED
|
||||
#mod_cdr_la_LDFLAGS += -lcurl
|
||||
|
||||
#Override link target so we can control the output
|
||||
|
||||
$(MODNAME).la: $(mod_cdr_la_OBJECTS) $(mod_cdr_la_DEPENDENCIES)
|
||||
@echo Creating $(MODNAME).$(DYNAMIC_LIB_EXTEN)...
|
||||
@$(CXXLINK) -rpath $(moddir) $(mod_cdr_la_LDFLAGS) $(mod_cdr_la_OBJECTS) $(mod_cdr_la_LIBADD) $(LIBS) $(LINK_OUTPUT_REDIR)
|
||||
|
||||
#Override the linstall target so we just install the .so/.dylib
|
||||
|
||||
install-data-am: $(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
|
||||
|
|
Loading…
Reference in New Issue