413 lines
12 KiB
Makefile
413 lines
12 KiB
Makefile
# Makefile
|
|
# This file holds the make rules for the Telephony Engine modules
|
|
|
|
# override DESTDIR at install time to prefix the install directory
|
|
DESTDIR :=
|
|
|
|
# override DEBUG at compile time to enable full debug or remove it all
|
|
DEBUG :=
|
|
|
|
CC := @CC@ -Wall
|
|
CXX := @CXX@ -Wall
|
|
MOC := @QT4_MOC@
|
|
QT4_INC := @QT4_INC@
|
|
QT4_LIB := @QT4_LIB@
|
|
QT4_INC_NET := @QT4_INC_NET@
|
|
QT4_LIB_NET := @QT4_LIB_NET@
|
|
QT4_STATIC_MODULES :=
|
|
HAVE_PGSQL := @HAVE_PGSQL@
|
|
PGSQL_INC := @PGSQL_INC@
|
|
PGSQL_LIB := -lpq
|
|
HAVE_MYSQL := @HAVE_MYSQL@
|
|
MYSQL_INC := @MYSQL_INC@
|
|
MYSQL_LIB := @MYSQL_LIB@
|
|
HAVE_SPANDSP := @HAVE_SPANDSP@
|
|
SPANDSP_INC := @SPANDSP_INC@
|
|
SPANDSP_LIB := @SPANDSP_LIB@
|
|
HAVE_OPENSSL := @HAVE_OPENSSL@
|
|
OPENSSL_INC := @OPENSSL_INC@
|
|
OPENSSL_LIB := @OPENSSL_LIB@
|
|
HAVE_ZLIB := @HAVE_ZLIB@
|
|
ZLIB_INC := @ZLIB_INC@
|
|
ZLIB_LIB := @ZLIB_LIB@
|
|
SED := sed
|
|
DEFS :=
|
|
INCLUDES := -I.. -I@top_srcdir@
|
|
CFLAGS := @CFLAGS@ @MODULE_CFLAGS@ @INLINE_FLAGS@
|
|
CPPFLAGS := @CFLAGS@ @MODULE_CPPFLAGS@ @INLINE_FLAGS@
|
|
LDFLAGS:= @LDFLAGS@
|
|
YATELIBS:= -L.. -lyate @LIBS@
|
|
MODFLAGS:= @MODULE_LDFLAGS@
|
|
MODRELAX:= @MODULE_LDRELAX@
|
|
MODSTRIP:= @MODULE_SYMBOLS@
|
|
INCFILES := @top_srcdir@/yateclass.h @top_srcdir@/yatengine.h @top_srcdir@/yatephone.h ../yateversn.h
|
|
|
|
JUSTSIG := server/ysigchan.yate server/analog.yate \
|
|
server/ciscosm.yate server/sigtransport.yate \
|
|
sig/isupmangler.yate sig/ss7_lnp_ansi.yate \
|
|
sig/camel_map.yate
|
|
|
|
SUBDIRS :=
|
|
MKDEPS := ../config.status
|
|
PROGS := cdrbuild.yate cdrfile.yate regexroute.yate \
|
|
tonegen.yate tonedetect.yate wavefile.yate \
|
|
extmodule.yate conference.yate moh.yate pbx.yate \
|
|
dumbchan.yate callfork.yate mux.yate \
|
|
yrtpchan.yate ystunchan.yate \
|
|
ysipchan.yate \
|
|
yiaxchan.yate \
|
|
yjinglechan.yate jabber/jabberserver.yate jabber/jbfeatures.yate \
|
|
ysockschan.yate filetransfer.yate \
|
|
server/pbxassist.yate server/dbpbx.yate server/lateroute.yate \
|
|
server/park.yate server/queues.yate server/queuesnotify.yate \
|
|
server/regfile.yate server/accfile.yate server/register.yate \
|
|
server/callcounters.yate server/cpuload.yate server/ccongestion.yate \
|
|
server/dbwave.yate \
|
|
server/yradius.yate \
|
|
server/ysnmpagent.yate \
|
|
server/monitoring.yate \
|
|
server/sipfeatures.yate \
|
|
sip/sip_cnam_lnp.yate \
|
|
server/heartbeat.yate server/clustering.yate \
|
|
server/mgcpgw.yate server/mgcpca.yate \
|
|
server/mrcpspeech.yate \
|
|
server/presence.yate server/subscription.yate \
|
|
server/users.yate \
|
|
$(JUSTSIG) \
|
|
server/analogdetect.yate \
|
|
server/cache.yate \
|
|
client/jabberclient.yate \
|
|
callgen.yate analyzer.yate rmanager.yate msgsniff.yate
|
|
|
|
LIBS :=
|
|
DIRS := client server jabber qt4 sip
|
|
|
|
ifneq ($(HAVE_PGSQL),no)
|
|
PROGS := $(PROGS) server/pgsqldb.yate
|
|
endif
|
|
|
|
ifneq ($(HAVE_MYSQL),no)
|
|
PROGS := $(PROGS) server/mysqldb.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_RESOLV@,no)
|
|
PROGS := $(PROGS) enumroute.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_SOUNDCARD@,no)
|
|
PROGS := $(PROGS) client/osschan.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_ALSA@,no)
|
|
PROGS := $(PROGS) client/alsachan.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_COREAUDIO@,no)
|
|
PROGS := $(PROGS) client/coreaudio.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_QT4@,no)
|
|
ifeq (@QT4_STATIC_MODULES@,no)
|
|
PROGS := $(PROGS) qt4/updater.yate qt4/customtable.yate qt4/customtext.yate \
|
|
qt4/customtree.yate qt4/widgetlist.yate qt4/clientarchive.yate
|
|
endif
|
|
endif
|
|
|
|
ifneq (@HAVE_ZAP@,no)
|
|
PROGS := $(PROGS) server/zapcard.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_WANPIPE@,no)
|
|
ifeq (@BUILD_WPCARD@,yes)
|
|
PROGS := $(PROGS) server/wpcard.yate
|
|
endif
|
|
ifeq (@HAVE_WANPIPE_API@,yes)
|
|
ifeq (@BUILD_TDMCARD@,yes)
|
|
PROGS := $(PROGS) server/tdmcard.yate
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
ifneq (@HAVE_SCTP_NETINET@,no)
|
|
PROGS := $(PROGS) server/lksctp.yate
|
|
endif
|
|
|
|
ifneq ($(HAVE_SPANDSP),no)
|
|
PROGS := $(PROGS) faxchan.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_H323@,no)
|
|
PROGS := $(PROGS) h323chan.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_GSM@,no)
|
|
PROGS := $(PROGS) gsmcodec.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_ILBC@,no)
|
|
PROGS := $(PROGS) ilbccodec.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_SPEEX@,no)
|
|
PROGS := $(PROGS) speexcodec.yate
|
|
endif
|
|
|
|
ifneq (@HAVE_AMRNB@,no)
|
|
PROGS := $(PROGS) amrnbcodec.yate
|
|
endif
|
|
|
|
ifneq ($(HAVE_OPENSSL),no)
|
|
PROGS := $(PROGS) openssl.yate
|
|
endif
|
|
|
|
ifneq ($(HAVE_ZLIB),no)
|
|
PROGS := $(PROGS) zlibcompress.yate
|
|
endif
|
|
|
|
ifeq (@HAVE_COREDUMPER@,yes)
|
|
COREDUMP_INC := -DHAVE_COREDUMPER @COREDUMPER_INC@
|
|
COREDUMP_LIB := @COREDUMPER_LIB@
|
|
endif
|
|
|
|
LOCALFLAGS =
|
|
LOCALLIBS =
|
|
CCOMPILE = $(CC) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS)
|
|
COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CPPFLAGS)
|
|
LINK = $(CXX) $(LDFLAGS)
|
|
MODLINK = $(CXX) $(MODFLAGS) $(MODSTRIP) $(LDFLAGS)
|
|
MODCOMP = $(COMPILE) $(MODFLAGS) $(MODSTRIP) $(LDFLAGS)
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
moddir = @libdir@/yate
|
|
|
|
# include optional local make rules
|
|
-include YateLocal.mak
|
|
|
|
.PHONY: all debug ddebug xdebug
|
|
all: subdirs do-all $(LIBS) $(PROGS)
|
|
|
|
debug:
|
|
$(MAKE) all DEBUG=-g3 MODSTRIP=
|
|
|
|
ddebug:
|
|
$(MAKE) all DEBUG='-g3 -DDEBUG' MODSTRIP=
|
|
|
|
xdebug:
|
|
$(MAKE) all DEBUG='-g3 -DXDEBUG' MODSTRIP=
|
|
|
|
.PHONY: strip
|
|
strip: all do-strip
|
|
strip --strip-debug --discard-locals $(PROGS)
|
|
|
|
.PHONY: clean
|
|
clean: do-clean
|
|
@-$(RM) $(PROGS) $(LIBS) *.o qt4/*.o qt4/*.moc core 2>/dev/null
|
|
@-for i in $(PROGS) ; do \
|
|
$(RM) -rf $$i.dSYM 2>/dev/null; \
|
|
done;
|
|
|
|
.PHONY: install
|
|
install: all do-install
|
|
@mkdir -p "$(DESTDIR)$(moddir)/" && \
|
|
for i in $(DIRS) ; do \
|
|
mkdir -p "$(DESTDIR)$(moddir)/$$i" ; \
|
|
done; \
|
|
for i in $(PROGS) ; do \
|
|
@INSTALL_D@ "$$i" "$(DESTDIR)$(moddir)/$$i" ; \
|
|
done;
|
|
|
|
.PHONY: uninstall
|
|
uninstall: do-uninstall
|
|
@-for i in $(PROGS) ; do \
|
|
rm "$(DESTDIR)$(moddir)/$$i" ; \
|
|
done; \
|
|
for i in $(DIRS) $(SUBDIRS) ; do \
|
|
rmdir "$(DESTDIR)$(moddir)/$$i" ; \
|
|
done;
|
|
@-rmdir "$(DESTDIR)$(moddir)"
|
|
|
|
.PHONY: subdirs
|
|
subdirs:
|
|
@mkdir -p $(DIRS)
|
|
|
|
qt4/%.o: @srcdir@/qt4/%.cpp $(MKDEPS) $(INCFILES)
|
|
$(MAKE) $(patsubst %.o,%.moc,$@)
|
|
$(COMPILE) -c -o $@ $(QT4_INC) -I@top_srcdir@/clients/qt4 -I@srcdir@/qt4 $<
|
|
|
|
%.o: @srcdir@/%.cpp $(MKDEPS) $(INCFILES)
|
|
$(COMPILE) -c $<
|
|
|
|
do-all do-strip do-clean do-install do-uninstall:
|
|
$(if $(SUBDIRS),\
|
|
@target=`echo $@ | $(SED) -e 's/^do-//'`; \
|
|
for i in $(SUBDIRS) ; do \
|
|
if test -f ./$$i/Makefile ; then \
|
|
$(MAKE) -C ./$$i $${target} || exit 1;\
|
|
fi; \
|
|
done \
|
|
)
|
|
|
|
Makefile: @srcdir@/Makefile.in $(MKDEPS)
|
|
cd .. && ./config.status
|
|
|
|
lib%.so: %.o
|
|
$(LINK) -shared -o $@ $^ $(YATELIBS)
|
|
|
|
server/%.yate: @srcdir@/server/%.cpp $(MKDEPS) $(INCFILES)
|
|
$(MODCOMP) -o $@ $(LOCALFLAGS) $< $(LOCALLIBS) $(YATELIBS)
|
|
|
|
client/%.yate: @srcdir@/client/%.cpp $(MKDEPS) $(INCFILES)
|
|
$(MODCOMP) -o $@ $(LOCALFLAGS) $< $(LOCALLIBS) $(YATELIBS)
|
|
|
|
qt4/%.yate: @srcdir@/qt4/%.cpp ../libyateqt4.so $(MKDEPS) $(INCFILES)
|
|
$(MAKE) $(patsubst %.yate,%.moc,$@)
|
|
$(MODCOMP) -o $@ $(LOCALFLAGS) $(QT4_INC) -I@top_srcdir@/clients/qt4 -Iqt4 $< $(LOCALLIBS) ../libyateqt4.so $(QT4_LIB) $(YATELIBS)
|
|
|
|
qt4/%.moc: @srcdir@/qt4/%.h $(MKDEPS) $(INCFILES)
|
|
mkdir -p qt4 && $(MOC) $(DEFS) $(INCLUDES) $(QT4_INC) -I@top_srcdir@/clients/qt4 -I@srcdir@/qt4 -o $@ $<
|
|
|
|
%.yate: @srcdir@/%.cpp $(MKDEPS) $(INCFILES)
|
|
$(MODCOMP) -o $@ $(LOCALFLAGS) $< $(LOCALLIBS) $(YATELIBS)
|
|
|
|
# Take special care of the modules that depend on optional libs
|
|
|
|
$(JUSTSIG) server/wpcard.yate server/tdmcard.yate server/zapcard.yate: ../libyatesig.so
|
|
$(JUSTSIG): LOCALFLAGS = -I@top_srcdir@/libs/ysig
|
|
server/wpcard.yate server/tdmcard.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysig @WANPIPE_FLAGS@
|
|
server/zapcard.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysig @ZAP_FLAGS@
|
|
$(JUSTSIG) server/wpcard.yate server/tdmcard.yate server/zapcard.yate: LOCALLIBS = -lyatesig
|
|
|
|
sig/ss7_lnp_ansi.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysig -I@top_srcdir@/libs/yasn
|
|
sig/ss7_lnp_ansi.yate: LOCALLIBS = -lyatesig -L../libs/yasn -lyasn
|
|
|
|
sig/camel_map.yate: ../libs/yasn/libyasn.a ../libs/yxml/libyatexml.a
|
|
sig/camel_map.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysig -I@top_srcdir@/libs/yasn -I@top_srcdir@/libs/yxml
|
|
sig/camel_map.yate: LOCALLIBS = -lyatesig -L../libs/yasn -lyasn -L../libs/yxml -lyatexml
|
|
|
|
server/analogdetect.yate: ../libs/ymodem/libyatemodem.a
|
|
server/analogdetect.yate: LOCALFLAGS = -I@top_srcdir@/libs/ymodem
|
|
server/analogdetect.yate: LOCALLIBS = -L../libs/ymodem -lyatemodem
|
|
|
|
h323chan.yate: LOCALFLAGS = @H323_INC@
|
|
h323chan.yate: LOCALLIBS = @H323_LIB@
|
|
|
|
server/pgsqldb.yate: LOCALFLAGS = $(PGSQL_INC)
|
|
server/pgsqldb.yate: LOCALLIBS = $(PGSQL_LIB)
|
|
|
|
server/mysqldb.yate: LOCALFLAGS = $(MYSQL_INC)
|
|
server/mysqldb.yate: LOCALLIBS = $(MYSQL_LIB)
|
|
|
|
client/alsachan.yate: LOCALLIBS = -lasound
|
|
|
|
client/coreaudio.yate: LOCALLIBS = -framework CoreServices -framework CoreAudio -framework AudioUnit -framework AudioToolBox
|
|
|
|
yiaxchan.yate: ../libs/yiax/libyateiax.a
|
|
yiaxchan.yate: LOCALFLAGS = -I@top_srcdir@/libs/yiax
|
|
yiaxchan.yate: LOCALLIBS = -L../libs/yiax -lyateiax
|
|
|
|
yjinglechan.yate jabber/jabberserver.yate jabber/jbfeatures.yate client/jabberclient.yate: ../libyatejabber.so
|
|
yjinglechan.yate jabber/jabberserver.yate jabber/jbfeatures.yate client/jabberclient.yate: LOCALFLAGS = -I@top_srcdir@/libs/yxml -I@top_srcdir@/libs/yjabber
|
|
yjinglechan.yate jabber/jabberserver.yate jabber/jbfeatures.yate client/jabberclient.yate: LOCALLIBS = -lyatejabber
|
|
|
|
server/dbpbx.yate server/pbxassist.yate: ../libs/ypbx/libyatepbx.a
|
|
server/dbpbx.yate server/pbxassist.yate: LOCALFLAGS = -I@top_srcdir@/libs/ypbx
|
|
server/dbpbx.yate server/pbxassist.yate: LOCALLIBS = -L../libs/ypbx -lyatepbx
|
|
|
|
server/mgcpca.yate: ../libyatemgcp.so ../libyatesig.so ../libs/ysdp/libyatesdp.a
|
|
server/mgcpca.yate: LOCALFLAGS = -I@top_srcdir@/libs/ymgcp -I@top_srcdir@/libs/ysig -I@top_srcdir@/libs/ysdp
|
|
server/mgcpca.yate: LOCALLIBS = -lyatemgcp -lyatesig -L../libs/ysdp -lyatesdp
|
|
|
|
server/mgcpgw.yate: ../libyatemgcp.so ../libs/ysdp/libyatesdp.a
|
|
server/mgcpgw.yate: LOCALFLAGS = -I@top_srcdir@/libs/ymgcp -I@top_srcdir@/libs/ysdp
|
|
server/mgcpgw.yate: LOCALLIBS = -lyatemgcp -L../libs/ysdp -lyatesdp
|
|
|
|
server/lksctp.yate: LOCALFLAGS = @SCTP_FLAGS@
|
|
server/lksctp.yate: LOCALLIBS = -lsctp
|
|
|
|
ilbccodec.yate: ../libs/ilbc/libilbc.a
|
|
ilbccodec.yate: LOCALFLAGS = @ILBC_INC@
|
|
ilbccodec.yate: LOCALLIBS = -L../libs/ilbc -lilbc
|
|
|
|
gsmcodec.yate: LOCALFLAGS = @GSM_INC@
|
|
gsmcodec.yate: LOCALLIBS = @GSM_LIB@
|
|
|
|
speexcodec.yate: LOCALFLAGS = @SPEEX_INC@
|
|
speexcodec.yate: LOCALLIBS = @SPEEX_LIB@
|
|
|
|
amrnbcodec.yate: LOCALFLAGS = @AMRNB_INC@
|
|
amrnbcodec.yate: LOCALLIBS = @AMRNB_LIB@
|
|
|
|
faxchan.yate: LOCALFLAGS = $(SPANDSP_INC)
|
|
faxchan.yate: LOCALLIBS = $(SPANDSP_LIB)
|
|
|
|
ysipchan.yate: ../libs/ysip/libyatesip.a ../libs/ysdp/libyatesdp.a
|
|
ysipchan.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysip -I@top_srcdir@/libs/ysdp
|
|
ysipchan.yate: LOCALLIBS = -L../libs/ysip -lyatesip -L../libs/ysdp -lyatesdp
|
|
|
|
yrtpchan.yate: ../libs/yrtp/libyatertp.a
|
|
yrtpchan.yate: LOCALFLAGS = -I@top_srcdir@/libs/yrtp
|
|
yrtpchan.yate: LOCALLIBS = -L../libs/yrtp -lyatertp
|
|
|
|
openssl.yate: LOCALFLAGS = $(OPENSSL_INC)
|
|
openssl.yate: LOCALLIBS = $(OPENSSL_LIB)
|
|
|
|
rmanager.yate: LOCALFLAGS = $(COREDUMP_INC)
|
|
rmanager.yate: LOCALLIBS = $(COREDUMP_LIB)
|
|
|
|
qt4/updater.yate: LOCALFLAGS = $(QT4_INC_NET)
|
|
qt4/updater.yate: LOCALLIBS = $(QT4_LIB_NET)
|
|
|
|
server/sipfeatures.yate: ../libs/yxml/libyatexml.a
|
|
server/sipfeatures.yate: LOCALFLAGS = -I@top_srcdir@/libs/yxml
|
|
server/sipfeatures.yate: LOCALLIBS = -L../libs/yxml -lyatexml
|
|
|
|
zlibcompress.yate: LOCALFLAGS = $(ZLIB_INC)
|
|
zlibcompress.yate: LOCALLIBS = $(ZLIB_LIB)
|
|
|
|
server/ysnmpagent.yate: ../libs/yasn/libyasn.a ../libs/ysnmp/libysnmp.a
|
|
server/ysnmpagent.yate: LOCALFLAGS = -I@top_srcdir@/libs/yasn -I@top_srcdir@/libs/ysnmp
|
|
server/ysnmpagent.yate: LOCALLIBS = -L../libs/yasn -lyasn -L../libs/ysnmp -lysnmp
|
|
|
|
../libyatesig.so ../libs/ysig/libyatesig.a:
|
|
$(MAKE) -C ../libs/ysig
|
|
|
|
../libs/ilbc/libilbc.a:
|
|
$(MAKE) -C ../libs/ilbc
|
|
|
|
../libs/ysip/libyatesip.a:
|
|
$(MAKE) -C ../libs/ysip
|
|
|
|
../libs/yrtp/libyatertp.a:
|
|
$(MAKE) -C ../libs/yrtp
|
|
|
|
../libs/ysdp/libyatesdp.a:
|
|
$(MAKE) -C ../libs/ysdp
|
|
|
|
../libs/yiax/libyateiax.a:
|
|
$(MAKE) -C ../libs/yiax
|
|
|
|
../libyatemgcp.so ../libs/ymgcp/libyatemgcp.a:
|
|
$(MAKE) -C ../libs/ymgcp
|
|
|
|
../libs/ymodem/libyatemodem.a:
|
|
$(MAKE) -C ../libs/ymodem
|
|
|
|
../libs/yxml/libyatexml.a:
|
|
$(MAKE) -C ../libs/yxml
|
|
|
|
../libyatejabber.so ../libs/yjabber/libyatejabber.a:
|
|
$(MAKE) -C ../libs/yjabber
|
|
|
|
../libs/ypbx/libyatepbx.a:
|
|
$(MAKE) -C ../libs/ypbx
|
|
|
|
../libyateqt4.so:
|
|
$(MAKE) -C ../clients/qt4
|
|
|
|
../libs/yasn/libyasn.a:
|
|
$(MAKE) -C ../libs/yasn
|
|
|
|
../libs/ysnmp/libysnmp.a:
|
|
$(MAKE) -C ../libs/ysnmp
|