--- Makefile.defs~ 2009-01-20 21:02:34.000000000 +0300
+++ Makefile.defs 2009-04-19 20:45:30.208412422 +0400
@@ -1,10 +1,3 @@
-ifeq ($(makefile_defs), 1)
-else
-makefile_defs=1
-export makefile_defs
-
-SVN_REV?=r$(shell svnversion -n .)
-
#version number
VERSION = 1
PATCHLEVEL = 1
@@ -14,153 +7,19 @@
REL_VERSION=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
RELEASE=$(REL_VERSION)$(EXTRAVERSION)
-CPPFLAGS += -D_DEBUG \
- -D_THREAD_SAFE -D_REENTRANT \
- -DSEMS_VERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"'\
- -DOS='"$(OS)"' \
-# -DMAX_RTP_SESSIONS=8192 \
-# -DOpenSER \
-# -DSUPPORT_IPV6 \
-# -DNO_THREADID_LOG \
-
-# compile with spandsp DTMF detection? see soft-switch.org
-# this needs a fairly new version of spandsp - tested with 0.0.4pre11
-# will not work with spandsp 0.0.2 .
-# (which means that current debian and gentoo packages don't work)
-#
-#USE_SPANDSP = yes
-# statically link spandsp library?
-# (might need adjusting spandsp lib path LIBSPANDSP_LDIR - may be /usr/lib)
-#LIBSPANDSP_STATIC = yes
-#LIBSPANDSP_LDIR = /usr/local/lib/
-
-
-# compile with sample rate conversion from secret rabbit code?
-# (see http://www.mega-nerd.com/SRC/)
-#
-#USE_LIBSAMPLERATE = yes
-
-#
-# ZRTP support? (see zfoneproject.com)
-#WITH_ZRTP = yes
-
-#
-# exclude some modules from compilation?
-# e.g. python modules:
-#exclude_modules ?= py_sems ivr mailbox pin_collect conf_auth mp3 examples
-
LDFLAGS += -lm
OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
-ifdef USE_SPANDSP
-ifneq ($(spandsp_defs), 1)
-spandsp_defs=1
-export spandsp_defs
-CPPFLAGS += -DUSE_SPANDSP -D__STDC_LIMIT_MACROS
-endif
-endif
-
-ifdef USE_LIBSAMPLERATE
-ifneq ($(libsrc_defs), 1)
-libsrc_defs=1
-export libsrc_defs
-CPPFLAGS += -DUSE_LIBSAMPLERATE
-endif
-endif
-
-# Additions for Solaris support.
-ifeq ($(OS),solaris)
- GETARCH=uname -p
- CPPFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -fPIC -include compat/solaris.h
- CFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -fPIC -include compat/solaris.h
- # For nanosleep.
- LDFLAGS += -lrt
- # For inet_aton.
- LDFLAGS += -lresolv
-
- # I don't have libspeex installed.
- # binrpcctrl does some really weird header stuff that doesn't work.
- exclude_modules += binrpcctrl ilbc speex
-else
- GETARCH=uname -m
-endif
-
-ARCH ?= $(shell $(GETARCH) |sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
- -e s/armv4l/arm/ -e "s/Power Macintosh/ppc/" \
- -e "s/cobalt/mips2/" \
- -e s/amd64/x86_64/ )
-
-# fix sparc -> sparc64
-ifeq ($(ARCH),sparc)
- ifeq ($(shell uname -m),sun4u)
- ARCH := sparc64
- endif
-endif
-
# need OS specific for this ?
CXX = g++
CC = gcc
LD = $(CC)
-
-CXXFLAGS += -Wall -Wno-reorder -fPIC -g \
- -O2 $(EXTRA_CXXFLAGS)
-
-CFLAGS += -Wall -fPIC -g -O2 $(EXTRA_CFLAGS)
-
-ifeq ($(DEBUG_PLAYOUT), yes)
-CPPFLAGS += -DDEBUG_PLAYOUTBUF
-endif
-
-ifdef WITH_ZRTP
-CPPFLAGS += -DWITH_ZRTP \
- -DBUILD_ZRTP_MUTEXES \
- -DBUILD_DEFAULT_CACHE -DBUILD_DEFAULT_TIMER -DUNIX -DBUILD_ZRTP_MUTEXES \
- -I/usr/local/include/zrtp
-endif
-
TARGET =
LIB_LDFLAGS = -shared
-ifeq ($(OS), linux)
- LDFLAGS += -ldl -rdynamic -lpthread
-else
-ifeq ($(OS), freebsd)
- LDFLAGS += -rdynamic -pthread
-else
-ifeq ($(OS), openbsd)
- LDFLAGS += -rdynamic -pthread
-else
-ifeq ($(OS), netbsd)
- LDFLAGS += -rdynamic -pthread
-else
-ifeq ($(OS), darwin)
- LDFLAGS += -rdynamic -pthread
- LIB_LDFLAGS = -flat_namespace -undefined suppress -bundle
- CXXFLAGS += -fno-common
- CFLAGS += -fno-common
-
- #necessary for sa_len|ss_len|sin_len
- # may be needed on other *BSD
- CPPFLAGS += -DBSD44SOCKETS
-
- # add the DarwinPorts directory
- ifneq ($(ARCH), iphone)
- CPPFLAGS += -D__DARWIN_UNIX03
- CPPFLAGS += -I /opt/local/include
- LDFLAGS += -L/opt/local/lib
- endif
-
- override exclude_modules += binrpcctrl mp3 examples py_sems
-else
- LDFLAGS+= -fPIC -ldl -lsocket -lnsl -lpthread
- TARGET=solaris
-endif
-endif
-endif
-endif
-endif
+LDFLAGS += -ldl -rdynamic -lpthread
LIB_LDFLAGS += $(LDFLAGS)
@@ -201,28 +60,8 @@
ser-cfg-dir = etc/ser/
-ifeq ($(OS), linux)
- doc-dir = share/doc/sems/
- man-dir = share/man/
-else
-ifeq ($(OS), freebsd)
- doc-dir = share/doc/sems/
- man-dir = man/
-else
-ifeq ($(OS), openbsd)
- doc-dir = share/doc/sems/
- man-dir = man/
-else
-ifeq ($(OS), netbsd)
- doc-dir = share/doc/sems
- man-dir = man/
-else
- doc-dir = doc/sems/
- man-dir = man/
-endif
-endif
-endif
-endif
+doc-dir = share/doc/sems/
+man-dir = share/man/
# target dirs for various stuff
bin-target = $(prefix)/$(bin-dir)
@@ -232,14 +71,8 @@
ser-cfg-target =$(ser-prefix)/$(ser-cfg-dir)
lib-target = $(prefix)/$(lib-dir)
-ifeq ($(OS), solaris)
-#use GNU versions
-INSTALL ?= ginstall
-TAR ?= gtar
-else
INSTALL ?= install
TAR ?= tar
-endif
INSTALL-TOUCH = touch # used to create the file first (good to
# make solaris install work)
@@ -251,7 +84,7 @@
#export stuff to sub-makes
export REL_VERSION RELEASE OS
-export CPPFLAGS CXXFLAGS LDFLAGS CFLAGS LIB_LDFLAGS
+export LDFLAGS LIB_LDFLAGS
export CXX CC LD
export DESTDIR PREFIX prefix basedir ser-prefix
export start-script
@@ -260,12 +93,6 @@
export bin-target cfg-target modules-target audio-target ser-cfg-target lib-target
export INSTALL TAR INSTALL-TOUCH INSTALL-CFG INSTALL-BIN INSTALL-MODULES INSTALL-DOC INSTALL-AUDIO
-export USE_SPANDSP LIBSPANDSP_STATIC LIBSPANDSP_LDIR
-export USE_LIBSAMPLERATE
-export WITH_ZRTP
-
-endif # ifeq ($(makefile_defs, 1)
-
mk-install-dirs: $(DESTDIR)$(cfg-target) \
$(DESTDIR)$(bin-prefix)/$(bin-dir) \
$(DESTDIR)$(modules-prefix)/$(modules-dir) \