121 lines
3.0 KiB
Makefile
121 lines
3.0 KiB
Makefile
# Makefile
|
|
# This file holds the make rules for the Telephony Engine
|
|
|
|
# override DEBUG at compile time to enable full debug or remove it all
|
|
DEBUG :=
|
|
|
|
CC := @CC@ -Wall
|
|
CXX := @CXX@ -Wall
|
|
SED := sed
|
|
DEFS :=
|
|
LIBAUX:= @DLOPEN_LIB@
|
|
LIBTHR:= -lpthread
|
|
INCLUDES := -I.. -I@top_srcdir@
|
|
CFLAGS := -O2 @MODULE_CFLAGS@ @INLINE_FLAGS@
|
|
CPPFLAGS := -O2 @MODULE_CPPFLAGS@ @INLINE_FLAGS@
|
|
LDFLAGS:=
|
|
LDCONFIG:=true
|
|
|
|
MKDEPS := @top_builddir@/config.status
|
|
YLIB:= libyate.so.@PACKAGE_VERSION@
|
|
CINC := @top_srcdir@/yateclass.h @top_srcdir@/yatemime.h
|
|
EINC := $(CINC) @top_srcdir@/yatengine.h
|
|
PINC := $(EINC) @top_srcdir@/yatephone.h
|
|
CLINC:= $(PINC) @top_srcdir@/yatecbase.h
|
|
LIBS :=
|
|
CLSOBJS := TelEngine.o ObjList.o HashList.o String.o DataBlock.o NamedList.o \
|
|
URI.o Mime.o Array.o Iterator.o YMD5.o YSHA1.o Mutex.o Thread.o Socket.o
|
|
ENGOBJS := Configuration.o Message.o Plugin.o Engine.o
|
|
TELOBJS := DataFormat.o Channel.o
|
|
CLIOBJS := Client.o
|
|
|
|
LIBOBJS := $(CLSOBJS) $(ENGOBJS) $(TELOBJS) $(CLIOBJS)
|
|
CLEANS = $(LIBOBJS) core
|
|
CCOMPILE = $(CC) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS)
|
|
COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CPPFLAGS)
|
|
LINK = $(CXX) $(LDFLAGS)
|
|
SCTPOPTS:=
|
|
|
|
ifneq (@HAVE_SCTP@,no)
|
|
SCTPOPTS := $(SCTPOPTS) -DHAVE_SCTP
|
|
endif
|
|
ifneq (@HAVE_SCTP_NETINET@,no)
|
|
SCTPOPTS := $(SCTPOPTS) -DHAVE_SCTP_NETINET
|
|
endif
|
|
ifeq (@INTERNAL_REGEX@,yes)
|
|
REGEX_INC:= -I@top_srcdir@/engine/regex
|
|
LIBOBJS := $(LIBOBJS) regex.o
|
|
else
|
|
REGEX_INC:=
|
|
endif
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
libdir = @libdir@
|
|
incdir = @includedir@/yate
|
|
moddir = @libdir@/yate
|
|
|
|
# include optional local make rules
|
|
-include YateLocal.mak
|
|
|
|
.PHONY: all debug ddebug xdebug
|
|
all: ../$(YLIB)
|
|
|
|
debug:
|
|
$(MAKE) all DEBUG=-g3
|
|
|
|
ddebug:
|
|
$(MAKE) all DEBUG='-g3 -DDEBUG'
|
|
|
|
xdebug:
|
|
$(MAKE) all DEBUG='-g3 -DXDEBUG'
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
@-$(RM) $(CLEANS) 2>/dev/null
|
|
|
|
.PHONY: strip
|
|
strip: all
|
|
-strip --strip-debug --discard-locals ../$(YLIB)
|
|
|
|
Engine.o: @srcdir@/Engine.cpp $(MKDEPS) $(EINC) ../yateversn.h ../yatepaths.h
|
|
$(COMPILE) -c $<
|
|
|
|
Channel.o: @srcdir@/Channel.cpp $(MKDEPS) $(PINC)
|
|
$(COMPILE) -c $<
|
|
|
|
DataBlock.o: @srcdir@/DataBlock.cpp $(MKDEPS) $(EINC)
|
|
$(COMPILE) -I@top_srcdir@/engine/tables -c $<
|
|
|
|
DataFormat.o: @srcdir@/DataFormat.cpp $(MKDEPS) $(PINC)
|
|
$(COMPILE) -c $<
|
|
|
|
Socket.o: @srcdir@/Socket.cpp $(MKDEPS) $(CINC)
|
|
$(COMPILE) @FDSIZE_HACK@ $(SCTPOPTS) -c $<
|
|
|
|
Mutex.o: @srcdir@/Mutex.cpp $(MKDEPS) $(CINC)
|
|
$(COMPILE) @MUTEX_HACK@ -c $<
|
|
|
|
Thread.o: @srcdir@/Thread.cpp $(MKDEPS) $(CINC)
|
|
$(COMPILE) @THREAD_KILL@ -c $<
|
|
|
|
Client.o: @srcdir@/Client.cpp $(MKDEPS) $(CLINC)
|
|
$(COMPILE) -c $<
|
|
|
|
String.o: @srcdir@/String.cpp $(MKDEPS) $(CINC)
|
|
$(COMPILE) $(REGEX_INC) -c $<
|
|
|
|
regex.o: @top_srcdir@/engine/regex/regex.c $(MKDEPS)
|
|
$(CCOMPILE) -DSTDC_HEADERS $(REGEX_INC) -c $<
|
|
|
|
%.o: @srcdir@/%.cpp $(MKDEPS) $(EINC)
|
|
$(COMPILE) -c $<
|
|
|
|
Makefile: @srcdir@/Makefile.in $(MKDEPS)
|
|
cd @top_builddir@ && ./config.status
|
|
|
|
../$(YLIB): $(LIBOBJS) $(LIBS)
|
|
$(LINK) -shared -o $@ -Wl,--soname=$(YLIB) $(LIBTHR) $^ $(LIBAUX)
|