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 <[email protected]>
Committer: Ovidiu Sas <[email protected]>
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
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to