globals.mak 1.35 KB
Newer Older
1
# Global variables
Julien Bonjean's avatar
Julien Bonjean committed
2

Rafaël Carré's avatar
Rafaël Carré committed
3
src=$(abs_top_srcdir)
4
5
6
sfllibdir=$(DESTDIR)$(libdir)/sflphone
sflcodecdir=$(sfllibdir)/codecs
sflplugindir=$(sfllibdir)/plugins
7

8
ASTYLERC="$(top_srcdir)/../astylerc"
9
10
indent="/usr/bin/astyle"

11
# for pjsip
12
include $(src)/libs/pjproject-2.1.0/build.mak
13
PJSIP_LIBS=$(APP_LDFLAGS) $(APP_LDLIBS)
14

15
16
17
18
SIP_CFLAGS=-I$(src)/libs/pjproject-2.1.0/pjsip/include \
		   -I$(src)/libs/pjproject-2.1.0/pjlib/include \
		   -I$(src)/libs/pjproject-2.1.0/pjlib-util/include \
		   -I$(src)/libs/pjproject-2.1.0/pjmedia/include \
19
20
		   -I$(src)/libs/pjproject-2.1.0/pjnath/include \
		   -DPJ_AUTOCONF=1
21
22
23
24

if BUILD_SPEEX
SPEEXCODEC=-DHAVE_SPEEX_CODEC
else
25
SPEEXCODEC=
26
27
endif

28
29
30
31
32
33
if BUILD_OPUS
OPUSCODEC=-DHAVE_OPUS
else
OPUSCODEC=
endif

34
35
36
if BUILD_GSM
GSMCODEC=-DHAVE_GSM_CODEC
else
37
GSMCODEC=
38
39
40
41
42
43
endif

# Preprocessor flags
AM_CPPFLAGS = \
	-I$(src)/libs \
	-I$(src)/libs/iax2 \
44
	-I$(src)/libs/pjproject-2.1.0 \
45
	-I$(src)/src \
46
	-I$(src)/src/config \
47
	-I$(src)/test \
48
	$(SIP_CFLAGS) \
49
	@DBUSCPP_CFLAGS@ \
50
51
52
53
54
	-DPREFIX=\"$(prefix)\" \
	-DPROGSHAREDIR=\"${datadir}/sflphone\" \
	-DCODECS_DIR=\""$(sflcodecdir)"\" \
	-DPLUGINS_DIR=\""$(sflplugindir)"\" \
	-DENABLE_TRACE \
55
56
57
	$(SPEEXCODEC) \
	$(GSMCODEC) \
	$(OPUSCODEC)
58
59
60
61
62


indent:
	@echo "Indenting code:"
	if [ -f $(ASTYLERC) ] ; then \
63
                find $(top_srcdir)/src/ -name \*.cpp -o -name \*.h | xargs $(indent) --options=$(ASTYLERC) ; \
64
	fi