mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-12 23:40:04 +00:00
Remove the requirement to define MODNAME in the module makefiles.
Remove gmakeisms from the modmake.rules module makefile include Remove the MODNAME def from all the in tree Makefiles git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4628 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d6547b8081
commit
70a70aa922
@ -21,21 +21,18 @@ LIBCURL_CPPFLAGS=@LIBCURL_CPPFLAGS@
|
||||
CURL_DIR=$(switch_srcdir)/libs/curl
|
||||
CURLLA=$(CURL_DIR)/lib/libcurl.la
|
||||
|
||||
OUR_CFLAGS=$(shell test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS))
|
||||
OUR_LDFLAGS=$(shell test -z "$(WANT_CURL)" || echo $(LIBCURL))
|
||||
OUR_DEPS=$(shell test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi)
|
||||
|
||||
LDFLAGS=@SWITCH_AM_LDFLAGS@ @LDFLAGS@ $(OUR_LDFLAGS)
|
||||
LIBS=$(switch_builddir)/libfreeswitch.la
|
||||
DEFS=@DEFS@
|
||||
PREFIX = @prefix@
|
||||
|
||||
DYLD_LIBRARY_PATH=$(PREFIX)/lib:$DYLD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=$(PREFIX)/lib:$LD_LIBRARY_PATH
|
||||
OSARCH=$(shell uname -s)
|
||||
OSARCH=`uname -s`
|
||||
DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
|
||||
SOLINK = @SOLINK@
|
||||
|
||||
LDFLAGS=@SWITCH_AM_LDFLAGS@ @LDFLAGS@ $(OUR_LDFLAGS)
|
||||
|
||||
ALL_CFLAGS = $(LOCAL_CFLAGS) $(MOD_CFLAGS) @SWITCH_AM_CFLAGS@ @CFLAGS@ -D_GNU_SOURCE $(OUR_CFLAGS)
|
||||
ALL_CXXFLAGS = $(LOCAL_CFLAGS) $(MOD_CFLAGS) @SWITCH_AM_CXXFLAGS@ @CXXFLAGS@ -D_GNU_SOURC $(OUR_CFLAGS)
|
||||
|
||||
@ -47,24 +44,64 @@ CXXCOMPILE = $(CXX) $(ALL_CXXFLAGS) $(DEFS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXXCOMPILE)
|
||||
CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
CURDIR=$(shell pwd)
|
||||
CSOURCEFILE=$(CURDIR)/$(MODNAME).c
|
||||
CXXSOURCEFILE=$(CURDIR)/$(MODNAME).cpp
|
||||
SOURCEFILE=$(shell if test -f $(CSOURCEFILE); then echo $(CSOURCEFILE); else echo $(CXXSOURCEFILE); fi;)
|
||||
CSOURCEFILE=$(MODNAME).c
|
||||
CXXSOURCEFILE=$(MODNAME).cpp
|
||||
|
||||
all: local_depend local_all $(MODNAME).$(DYNAMIC_LIB_EXTEN) Makefile
|
||||
depend: local_depend
|
||||
clean: local_clean mod_clean
|
||||
install: all depend_install local_install mod_install
|
||||
uninstall: local_uninstall mod_uninstall
|
||||
distclean: clean local_distclean
|
||||
extraclean: distclean local_extraclean
|
||||
RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'`
|
||||
RECURSE_SOURCEFILE=`if test -f $$modname.cpp; then echo $$modname.cpp; else echo $$modname.c; fi`
|
||||
RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi`
|
||||
RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS)`
|
||||
RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL)`
|
||||
RECURSE_CHECKS=if test -z "$(MODNAME)" || test -z "$(SOURCEFILE)" || test -z "$(OUR_DEPS)" ; \
|
||||
then modname=$(RECURSE_MODNAME) ; \
|
||||
sourcefile=$(RECURSE_SOURCEFILE) ; \
|
||||
ourdefs=$(RECURSE_OUR_DEPS) ; \
|
||||
ourcflags=$(RECURSE_OUR_CFLAGS) ; \
|
||||
ourldflags=$(RECURSE_OUR_LDFLAGS) ;
|
||||
|
||||
all: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags all-modules || exit 1;\
|
||||
fi
|
||||
depend: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags depend-modules || exit 1;\
|
||||
fi
|
||||
clean: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags clean-modules || exit 1;\
|
||||
fi
|
||||
install: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags install-modules || exit 1;\
|
||||
fi
|
||||
uninstall: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags uninstall-modules || exit 1;\
|
||||
fi
|
||||
distclean: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags distclean-modules || exit 1;\
|
||||
fi
|
||||
extraclean: Makefile
|
||||
@$(RECURSE_CHECKS) \
|
||||
$(MAKE) MODNAME=$$modname SOURCEFILE=$$sourcefile OUR_DEPS=$$ourdefs OUR_CFLAGS=$$ourcflags OUR_LDFLAGS=$$our_ldflags extraclean-modules || exit 1;\
|
||||
fi
|
||||
|
||||
|
||||
all-modules: local_depend local_all $(MODNAME).$(DYNAMIC_LIB_EXTEN) Makefile
|
||||
depend-modules: local_depend
|
||||
clean-modules: local_clean mod_clean
|
||||
install-modules: all depend_install local_install mod_install
|
||||
uninstall-modules: local_uninstall mod_uninstall
|
||||
distclean-modules: clean local_distclean
|
||||
extraclean-modules: distclean local_extraclean
|
||||
|
||||
Makefile:
|
||||
if test ! -f $@; then \
|
||||
echo MODNAME=$(MODNAME) > Makefile ; \
|
||||
@if test ! -f $@; then \
|
||||
if ! pwd | grep $(switch_srcdir)/src/mod ; then rulesdir=$(switch_srcdir) ; else rulesdir=../../../.. ; fi ; \
|
||||
echo include $$rulesdir/build/modmake.rules >> Makefile ; \
|
||||
echo BASE=$$rulesdir > Makefile ; \
|
||||
echo "include $(BASE)/build/modmake.rules" >> Makefile ; \
|
||||
fi ;
|
||||
|
||||
$(CURLLA):
|
||||
@ -171,7 +208,8 @@ $(switch_srcdir)/src/include/switch_log.h:
|
||||
|
||||
$(switch_srcdir)/src/include/switch_xml.h:
|
||||
|
||||
.PHONY: all depend clean local_all local_depend \
|
||||
install depend_install local_install mod_install \
|
||||
clean local_clean mod_clean distclean \
|
||||
local_distclean extraclean local_extraclean
|
||||
|
||||
.PHONY: all clean depend install distclean extraclean \
|
||||
all-modules clean-modules depend-modules install-modules distclean-modules extraclean-modules \
|
||||
local_all local_clean local_depend local_install local_distclean local_extraclean \
|
||||
mod_clean mod_install mod_uninstall depend_install
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_enum
|
||||
|
||||
BASE=../../../..
|
||||
UDNSA=$(BASE)/libs/udns/libudns.a
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/udns
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
OSARCH=$(shell uname -s)
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_cepstral
|
||||
|
||||
|
||||
ifeq ($(OSARCH),Darwin)
|
||||
LOCAL_LDFLAGS += -framework swift
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_lumenvox
|
||||
|
||||
LOCAL_CFLAGS= -fpermissive -Wno-deprecated -Wno-conversion -fpermissive -Wno-unused -Wno-comment -Wno-sign-compare \
|
||||
-Wno-conversion -Wno-reorder -I/opt/lumenvox/eng\ine_7.0/include
|
||||
LOCAL_LDFLAGS= -L/opt/lumenvox/engine_7.0/lib -llv_lvspeechport
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_amr
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
topdir=$(shell cd $(BASE) && pwd)
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_g711
|
||||
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/codec/g7xx/src/include
|
||||
LOCAL_LDFLAGS=
|
||||
LOCAL_OBJS=
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_g722
|
||||
|
||||
BASE=../../../..
|
||||
G7XXLA=$(BASE)/libs/codec/g7xx/libg7xx.la
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/codec/g7xx/src/include/
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_g723_1
|
||||
|
||||
BASE=../../../..
|
||||
topdir=$(shell cd $(BASE) && pwd)
|
||||
ifeq ($(shell test -d $(topdir)/libs/libg723_1 && cd $(topdir)/libs/libg723_1 && pwd),$(topdir)/libs/libg723_1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_g726
|
||||
|
||||
BASE=../../../..
|
||||
G726LA=$(BASE)/libs/codec/g726/libg726.la
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/codec/g726/src
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_g729
|
||||
|
||||
BASE=../../../..
|
||||
topdir=$(shell cd $(BASE) && pwd)
|
||||
ifeq ($(shell test -d $(topdir)/libs/libg729 && cd $(topdir)/libs/libg729 && pwd),$(topdir)/libs/libg729)
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_gsm
|
||||
|
||||
BASE=../../../..
|
||||
GSMLA=$(BASE)/libs/codec/gsm/libgsm.la
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/codec/gsm/inc
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_ilbc
|
||||
|
||||
BASE=../../../..
|
||||
ILBCLA=$(BASE)/libs/codec/ilbc/libilbc.la
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/codec/ilbc/src
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_lpc10
|
||||
|
||||
BASE=../../../..
|
||||
LPC10LA=$(BASE)/libs/codec/lpc10/liblpc10.la
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/codec/lpc10/src
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_speex
|
||||
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_ldap
|
||||
|
||||
switch_srcdir=../../../..
|
||||
|
||||
LDAP=openldap-2.3.19
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_dingaling
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
IKSEMELLA=$(BASE)/libs/iksemel/src/libiksemel.la
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_iax
|
||||
|
||||
BASE=../../../..
|
||||
IAXLA=$(BASE)/libs/iax/src/libiax.la
|
||||
LOCAL_CFLAGS=-I$(BASE)/libs/iax/src
|
||||
|
@ -1,6 +1,6 @@
|
||||
BASE=../../../..
|
||||
OSARCH=$(shell uname -s)
|
||||
MODNAME=mod_portaudio
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
PALA=$(BASE)/libs/portaudio/lib/libportaudio.la
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_sofia
|
||||
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_wanpipe
|
||||
|
||||
LOCAL_CFLAGS =-I/usr/local/include -I/usr/src/libpri -I/usr/src/linux/include -I. -I/usr/include
|
||||
LOCAL_CFLAGS +=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -DAFT_A104 -DWANPIPE_TDM_API -I$(switch_srcdir)/libs/libteletone/src
|
||||
LOCAL_LDFLAGS=-lsangoma $(BASE)/libs/libteletone/libteletone.la
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_cdr
|
||||
|
||||
LOCAL_CFLAGS=
|
||||
LOCAL_LDFLAGS=
|
||||
LOCAL_OBJS=cdrcontainer.o basecdr.o baseregistry.o pddcdr.o csvcdr.o xmlcdr.o sqlitecdr.o
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_xmpp_event
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
IKSEMELLA=$(BASE)/libs/iksemel/src/libiksemel.la
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_zeroconf
|
||||
|
||||
switch_srcdir=../../../..
|
||||
|
||||
HOWL=howl-1.0.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_shout
|
||||
|
||||
LAME=lame-3.97
|
||||
SHOUT=libshout-2.2.2
|
||||
switch_srcdir=../../../..
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_sndfile
|
||||
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_mono
|
||||
|
||||
VERSION = mono-1.1.13.8
|
||||
TARBALL = mono-1.1.13.8.tar.gz
|
||||
GLIB_TARBALL = glib-2.12.3.tar.gz
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_perl
|
||||
|
||||
LOCAL_CFLAGS=-DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL
|
||||
LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}')
|
||||
LOCAL_OBJS=perlxsi.o
|
||||
|
@ -2,7 +2,7 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_python
|
||||
|
||||
LOCAL_CFLAGS=-I$(PREFIX)/include/python2.4/
|
||||
LOCAL_LDFLAGS=-lpython2.4 -L$(PREFIX)/lib/python2.4/config/ -lutil -lstdc++
|
||||
LOCAL_OBJS=freeswitch_python.o mod_python_wrap.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_spidermonkey
|
||||
|
||||
WANT_CURL=yes
|
||||
|
||||
LOCAL_CFLAGS=
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_spidermonkey_core_db
|
||||
|
||||
switch_srcdir=../../../..
|
||||
LOCAL_CFLAGS=
|
||||
LOCAL_LDFLAGS=
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_spidermonkey_etpan
|
||||
|
||||
|
||||
switch_srcdir=../../../..
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_spidermonkey_odbc
|
||||
|
||||
switch_srcdir=../../../..
|
||||
|
||||
ODBC=unixODBC-2.2.12
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_spidermonkey_skel
|
||||
|
||||
switch_srcdir=../../../..
|
||||
LOCAL_CFLAGS=
|
||||
LOCAL_LDFLAGS=
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_spidermonkey_teletone
|
||||
|
||||
switch_srcdir=../../../..
|
||||
LOCAL_CFLAGS=-I$(switch_srcdir)/libs/libteletone/src
|
||||
LOCAL_LDFLAGS=
|
||||
|
@ -2,6 +2,6 @@
|
||||
# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean:
|
||||
|
||||
# and define these variables to impact your build
|
||||
MODNAME=mod_xml_curl
|
||||
|
||||
WANT_CURL=yes
|
||||
include ../../../../build/modmake.rules
|
||||
|
@ -1,4 +1,4 @@
|
||||
MODNAME=mod_xml_rpc
|
||||
|
||||
BASE=../../../..
|
||||
|
||||
XMLRPCLAS = $(BASE)/libs/xmlrpc-c/src/libxmlrpc.la $(BASE)/libs/xmlrpc-c/src/libxmlrpc_server.la
|
||||
|
Loading…
x
Reference in New Issue
Block a user