[sr-dev] git:master: cdp: fix cross-compilation

Ovidiu Sas osas at voipembedded.com
Sat Dec 1 22:57:18 CET 2012


Module: sip-router
Branch: master
Commit: 8321d1fadb50017b52bcfebd1857982a60915dfe
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8321d1fadb50017b52bcfebd1857982a60915dfe

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Sat Dec  1 16:52:19 2012 -0500

cdp: fix cross-compilation

---

 modules/cdp/Makefile |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/cdp/Makefile b/modules/cdp/Makefile
index 16eaef8..310e40c 100644
--- a/modules/cdp/Makefile
+++ b/modules/cdp/Makefile
@@ -4,9 +4,19 @@ NAME=cdp.so
 
 DEFS+=-DSER_MOD_INTERFACE
 
+ifeq ($(CROSS_COMPILE),)
+XML2CFG=$(shell which xml2-config)
+endif
 
-DEFS += -I/usr/include/libxml2 
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
+ifneq ($(XML2CFG),)
+	DEFS += $(shell $(XML2CFG) --cflags )
+	LIBS += $(shell $(XML2CFG) --libs)
+	LIBS += -lrt
+else
+	INCLUDES +=-I$(LOCALBASE)/include/libxml2 \
+		-I$(LOCALBASE)/include
+	LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
+endif
 
 include ../../Makefile.modules
 




More information about the sr-dev mailing list