Module: sip-router
Branch: master
Commit: 622640b85cbf681055c1a9c28d3f3ab61c13b36e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=622640b…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Thu Jan 10 16:53:12 2013 -0500
ims_registrar_scscf: fix cross-compilation
---
modules/ims_registrar_scscf/Makefile | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/modules/ims_registrar_scscf/Makefile b/modules/ims_registrar_scscf/Makefile
index 18eae71..0123c73 100644
--- a/modules/ims_registrar_scscf/Makefile
+++ b/modules/ims_registrar_scscf/Makefile
@@ -8,16 +8,22 @@
include ../../Makefile.defs
auto_gen=
NAME=ims_registrar_scscf.so
-LIBS=
-DEFS+=-DOPENSER_MOD_INTERFACE
-DEFS += -I/usr/include/libxml2
-LIBS += -L$(LOCALBASE)/lib -lxml2
+ifeq ($(CROSS_COMPILE),)
+XML2CFG=$(shell which xml2-config)
+endif
-ifneq ($(OS),darwin)
- LIBS += -lrt
+ifneq ($(XML2CFG),)
+ DEFS += $(shell $(XML2CFG) --cflags )
+ LIBS += $(shell $(XML2CFG) --libs)
+else
+ DEFS+=-I$(LOCALBASE)/include/libxml2 \
+ -I$(LOCALBASE)/include
+ LIBS+=-L$(LOCALBASE)/lib -lxml2
endif
+DEFS+=-DOPENSER_MOD_INTERFACE
+
SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/kcore/kcore
SER_LIBS+=$(SERLIBPATH)/ims/kamailio_ims