globals.mk 846 Bytes
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
ringlibdir=$(DESTDIR)$(libdir)/ring
5

6
ASTYLERC="$(top_srcdir)/../astylerc"
7
indent="/usr/bin/astyle"
8

9 10
RING_DIRTY_REPO ?= $(shell git diff-index --quiet HEAD 2>/dev/null || echo dirty)
RING_REVISION ?= $(shell git log -1 --format="%h" --abbrev=10 2>/dev/null)
11

12 13 14
# Preprocessor flags
AM_CPPFLAGS = \
	-I$(src)/src \
15
	-I$(src)/src/config \
16
	-I$(src)/src/media \
17
	-I$(src)/test \
18
	-I$(src)/src/dring \
19
	$(SIP_CFLAGS) \
20
	-DPREFIX=\"$(prefix)\" \
Adrien Béraud's avatar
Adrien Béraud committed
21
	-DPROGSHAREDIR=\"${datadir}/ring\" \
22
	-DENABLE_TRACE \
23 24
	-DRING_REVISION=\"$(RING_REVISION)\" \
	-DRING_DIRTY_REPO=\"$(RING_DIRTY_REPO)\" \
25
	-DPJSIP_MAX_PKT_LEN=8000 \
26
	-DPJ_AUTOCONF=1
27 28 29 30

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