src/modules/app_perl/Makefile
ac9ce6fb
 # perl module makefile
 #
6447de0c
 #
ac9ce6fb
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
9d5cc708
 auto_gen=kamailioxs.c
ba3fa594
 NAME=app_perl.so
820f28ae
 LIBS=
f881cc19
 
 ifeq ($(PERLLDOPTS),)
 	LIBS+=`perl -MExtUtils::Embed -e ldopts`
 else
 	LIBS+=$(PERLLDOPTS)
 endif
 
 ifeq ($(PERLCCOPTS),)
d5ea9c62
 	PERLCCOPTS=$(shell perl -MExtUtils::Embed -e ccopts)
f881cc19
 endif
d5ea9c62
 DEFS+=$(PERLCCOPTS)
f881cc19
 
9bd0acde
 SERLIBPATH=../../lib
ac9ce6fb
 
9d5cc708
 PODFILES=kamailioxs.xs `find lib/perl -name *.pm`
ac9ce6fb
 
f881cc19
 ifeq ($(TYPEMAP),)
 	ifeq ($(PERLLIBPATH),)
 		PERLLIBPATH=`perl -MConfig -e 'print $$Config{installprivlib}'`
 	endif
 	TYPEMAP=$(PERLLIBPATH)/ExtUtils/typemap
 endif
ac9ce6fb
 
bd3e0283
 include ../../Makefile.modules
 
9d5cc708
 perl.d: kamailioxs.o
 perl.o: perl.c kamailioxs.o
ac9ce6fb
 
9d5cc708
 kamailioxs.o: CFLAGS+=-Wno-unused
ac9ce6fb
 
9d5cc708
 kamailioxs.c: kamailioxs.xs typemap
 	xsubpp -typemap $(TYPEMAP) -typemap typemap kamailioxs.xs > kamailioxs.c
ac9ce6fb
 
 .PHONY: perlpod
ba3fa594
 perlpod: doc/app_perl_pod.xml
ac9ce6fb
 
ba3fa594
 doc/app_perl_pod.sgml: kamailioxs.xs
 	cat $(PODFILES) | pod2docbook --doctype=chapter --title='Kamailio Perl API' --no-header - doc/app_perl_pod.sgml
7fa5092b
 
7e327d60
 install-perl-scripts:
9d5cc708
 	echo "installing Perl Kamailio packages ..."
70000280
 	mkdir -p $(modules_prefix)/$(lib_dir)/perl
 	$(INSTALL_CFG) lib/perl/*.pm $(modules_prefix)/$(lib_dir)/perl
9d5cc708
 	mkdir -p $(modules_prefix)/$(lib_dir)/perl/Kamailio
 	$(INSTALL_CFG) lib/perl/Kamailio/*.pm \
 		$(modules_prefix)/$(lib_dir)/perl/Kamailio
 	mkdir -p $(modules_prefix)/$(lib_dir)/perl/Kamailio/LDAPUtils
 	$(INSTALL_CFG) lib/perl/Kamailio/LDAPUtils/*.pm \
 		$(modules_prefix)/$(lib_dir)/perl/Kamailio/LDAPUtils
 	mkdir -p $(modules_prefix)/$(lib_dir)/perl/Kamailio/Utils
 	$(INSTALL_CFG) lib/perl/Kamailio/Utils/*.pm \
 		$(modules_prefix)/$(lib_dir)/perl/Kamailio/Utils
 	mkdir -p $(modules_prefix)/$(lib_dir)/perl/Kamailio/VDB
 	$(INSTALL_CFG) lib/perl/Kamailio/VDB/*.pm \
 		$(modules_prefix)/$(lib_dir)/perl/Kamailio/VDB
 	mkdir -p $(modules_prefix)/$(lib_dir)/perl/Kamailio/VDB/Adapter
 	$(INSTALL_CFG) lib/perl/Kamailio/VDB/Adapter/*.pm \
 		$(modules_prefix)/$(lib_dir)/perl/Kamailio/VDB/Adapter
7fa5092b
 
7e327d60
 install-scripts: install-perl-scripts