gsmopen: reporting git version of files in logging

This commit is contained in:
Giovanni Maruzzelli 2012-04-20 10:23:50 +02:00
parent 470005fcdb
commit b453c2fdfc
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,5 @@
MODNAME=mod_gsmopen
SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
LOCAL_CFLAGS += $(SVNDEF) -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff
LOCAL_CFLAGS += -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme
LOCAL_OBJS=gsmopen_protocol.o
include ../../../../build/modmake.rules

View File

@ -11,7 +11,7 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
mod_LTLIBRARIES = mod_gsmopen.la
mod_gsmopen_la_SOURCES = mod_gsmopen.cpp gsmopen_protocol.cpp
mod_gsmopen_la_CFLAGS = $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -DGSMOPEN_SVN_VERSION=\"`cat $(switch_builddir)/.version`\"
mod_gsmopen_la_CFLAGS = $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA)
mod_gsmopen_la_LDFLAGS = -avoid-version -module -no-undefined -lctb-0.16 -lgsmme

View File

@ -108,6 +108,12 @@
//#define SAMPLERATE_GSMOPEN 16000
//#define SAMPLES_PER_FRAME SAMPLERATE_GSMOPEN/50
#ifdef GSMOPEN_C_VER
#ifdef MODGSMOPEN_C_VER
#define GSMOPEN_SVN_VERSION MODGSMOPEN_C_VER"|"GSMOPEN_C_VER
#endif
#endif
#ifndef GSMOPEN_SVN_VERSION
#define GSMOPEN_SVN_VERSION SWITCH_VERSION_REVISION
#endif /* GSMOPEN_SVN_VERSION */