packages/net/freeswitch/patches/205-src-mod-endpoints-mod_gsmopen-Makefile.patch

21 lines
1.1 KiB
Diff
Raw Normal View History

--- a/src/mod/endpoints/mod_gsmopen/Makefile
+++ b/src/mod/endpoints/mod_gsmopen/Makefile
@@ -1,5 +1,15 @@
+BASE=../../../..
MODNAME=mod_gsmopen
-LOCAL_CFLAGS += -I../../../../libs/spandsp/src -I../../../..//libs/tiff-4.0.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
+SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
+
+TIFF_DIR="$(shell ls -d $(switch_srcdir)/libs/tiff*)"
+TIFF_BUILDDIR=$(TIFF_DIR)
+TIFF_LA=$(TIFF_BUILDDIR)/libtiff/libtiff.la
+
+SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
+SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
+SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
+LOCAL_CFLAGS += $(SVNDEF) -I$(BASE)/libs/spandsp/src -I$(TIFF_DIR)/libtiff -I$(BASE)/src/mod/endpoints/mod_gsmopen/libctb-0.16/include -fpermissive
+LOCAL_LDFLAGS=-L$(BASE)/libs/spandsp/src -lspandsp -L$(BASE)/src/mod/endpoints/mod_gsmopen/libctb-0.16/lib -lctb-0.16
LOCAL_OBJS=gsmopen_protocol.o
include ../../../../build/modmake.rules